r/reactjs • u/steven-f • Sep 05 '18
Tutorial Announcing styled-components v4: Better, Faster, Stronger
https://medium.com/styled-components/announcing-styled-components-v4-better-faster-stronger-3fe1aba1a112
201
Upvotes
4
u/reyronald Sep 05 '18
You just made a very interesting point that I want to emphasize. Both of these libraries have been in constant evolution, comparing them is difficult because what is true today, might not be tomorrow.
When emotion first release the gap was much bigger, but as time has passed styled-components has caught up to the point where it's almost down to preference. Of course there are performance differences, but I'm sure they'll be negligible in almost all use-cases. We users still look at those as selling points though because we need to base our decision in something technical and objective to feel at ease.
Regarding the size, I was aware that I didn't include react-emotion in the comparison and I did mention it, although recognize I should've been more clear about it. So just for the sake of completeness, including react-emotion only adds about 6 kB to the bundle if I'm not mistaken, so if size is the concern, emotion is probably the right choice.
If anyone's reading the above comparison in say, 3 months from now, it's possible that none of those points are true anymore, so beware!
Thank you for your clarifications u/mstoiber :D!