- React
- ReactEurope
- 2015
- Inline Styles: themes, media queries, contexts, & when it's best to use CSS
Inline Styles: themes, media queries, contexts, & when it's best to use CSS
Michael Chan at ReactEurope 2015
React allows you to write styles inline and bypass a host of CSS shortcomings. Scope, dependency management, dead code elimination, these problems go away when adding your styles directly to components. But it's not all rainbows and unicorns. Things like theming and media queries become much more difficult when all your styles live directly on components. In this talk, we'll look at how to solve these problems with contexts and plain old JavaScript. We'll also look at the role of container-components and when it's better to "just use CSS."