[Talk Summary] Styling React/ReactNative Applications — Max Stoiber
Published in
1 min readJan 8, 2018
This is a good talk about how do our “Document base web development, class name base styling” switch to the “Component base web development and styling”, but if you don’t have time to watch it. Here is the very short summary of this talk.
- Classname is just mapping. If you can use component and the style only apply to this component, you don’t need a classname at all.
styled-components
is the solution for writing “real” css in your JS component. You can writefont-size
instead offontSize. You can also use media query, conditional styling with props, javascript function, built in theme and more.(check out the documentation)
styled-components
support react-native. AFAIK onlystyled-components
,fela
andglamorous
have react-native support. see Awesome CSS in JS.
I hope this help you to save some of your time, thanks.