With styled-components into the future – 💅 styled-components – Medium

With styled-components into the future  #styledcomponents #react #cssinjs #css #reactjs

  • Those remain the same and intact.While this sounds like no more can be achieved from a library that was mostly about best practices and common patterns in CSS, we are still in a position to drive change in the community.And this is because of the ecosystem that people have created…
  • Even more so with our new docs that we’ve published a few months ago.But the real question is, what makes it the library you know and love?There’s a lot of great content and talks from both Max and Glen, so if you’re new to what the ideas of the library are,…
  • [1]Then we have to transform the CSS to be able to inject it [2], and finally inject your CSS into the stylesheet, at the position that we’ve marked earlier.In v2 and onwards we’ve focused a lot on optimising all of the different steps involved here for performance, but one step…
  • The idea that becomes increasingly important here is, that we can’t build a library that works for some special use cases, but what we can build is a CSS infrastructure that allows you to change the CSS yourself.Let’s see how we could approach this.The interesting thing is that with v1…
  • We can run our transformations during Babel’s transpilation, or during build-time in general.We can build a CSS-in-JS pipeline!This would result in nothing being shipped to the runtime, and as long as we can provide an “opt-in” system, you would still be able to decide whether you’d like to ship the…

styled-components has changed a lot in its past. And we are not even done yet!

With styled-components into the futurePreprocessing is dead, long live preprocessing!This is a transcript of a talk I gave on the 11th of October, 2017, at WEBdeLDN.styled-components has changed a lot in its past. And we are not even done yet!Since the beginning of the year styled-components has grown in popularity like no other CSS-in-JS library.It was also around this time that I joined the core team. Together with Glen and Max, we have improved a lot in the library and have arrived at an API in v2 that we are quite happy with.Let’s discover what we have planned for it in the future! Most of what I’ll be talking about are the internals of styled-components and hopefully I can convey where we think some improvements can be made and what can be gained from them.What puts us in a position to drive change in the community?Most of what we are trying to build now has nothing to do with our core ideas. Those remain the same and intact.While this sounds like no more can be achieved from a library that was mostly about best practices and common patterns in CSS, we are still in a position to drive change in the community.And this is because of the ecosystem that people have created around the library this year and the size we’ve reached.In fact, it is fair to call it the most popular CSS-in-JS library to date.With over 10K stars, lots of great projects building with and on it, and with 147 contributors…

With styled-components into the future – 💅 styled-components – Medium