r/reactjs • • Sep 05 '18

Tutorial Announcing styled-components v4: Better, Faster, Stronger

https://medium.com/styled-components/announcing-styled-components-v4-better-faster-stronger-3fe1aba1a112
203 Upvotes

80 comments sorted by

View all comments

Show parent comment

9

u/ngly Sep 05 '18

You can write any JavaScript logic you want in your CSS. You can pass Props into your styles.

The two main things imo. I also prefer the semantics of SC where everything is a named component instead of tagging on classnames. Oh, and there's no such thing as global styles. That's a huge one.

0

u/[deleted] Sep 05 '18

[deleted] — view deleted comment

5

u/gonzofish Sep 06 '18

This is the hurdle I can't clear to convert to CSS-in-JS, SASS + Webpack already does the specificity thing for you.