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
203
Upvotes
View all comments
Show parent comment
12
u/[deleted] Sep 05 '18
I personally found it painful to toggle class names (before using styled components / css-in-js), where styled components I can pass a prop, and use css`background:tomato;`.
You can also nest (like I used to in SASS).
I also appreciate being able to select components inside the style block. https://www.styled-components.com/docs/advanced#referring-to-other-components
All of these were improvements to my workflow :)