1. React
  2. ReactiveConf
  3. 2016
  4. Styled-components: Enforcing best practices

Styled-components: Enforcing best practices

Max Stoiber at ReactiveConf 2016

Building user interfaces on the web is hard, because the web, and thus CSS, was inherently made for documents. Because UIs fundamentally are not documents, we've seen a mindset shift towards building them as component-based system – we are now in the component age. The rise of JavaScript frameworks like React, Ember and recently Angular 2, the effort of the W3C to standardize a web-native component system, pattern libraries and styleguides being considered 'the right way to build web applications' and many other things have illuminated this revolution. With that, and a few more things, in mind, Glen Maddern (CSS Modules creator) and I sat down and started thinking about styling in this new era. We took the best of CSS and the web to build a new way to style react applications. Let's talk about what we thought about and why we arrived where we did – πŸ’… styled-components.