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
206 Upvotes

80 comments sorted by

View all comments

Show parent comment

2

u/Existential_Owl Sep 05 '18

The configuration is a little different between the two.

For instance, it's easy to drop Styled Components into Create React App, while Emotion requires something like Rewired to make it work. (It's been awhile since I've used Emotion, though, so I dunno if this has changed).

Other than, it's just a matter of preference I guess.

3

u/swyx Sep 05 '18

hmm, if thats the case then in CRA v2 that difference will go away (and i believe emotion dropped its babel plugin dependency a while ago anyway).

ah well. in the absence of any compelling thing i’ll go with styled components.

2

u/jgoux Sep 05 '18

CRA v2 that difference will go away

Could you expand on this? What will be different in CRA v2?

1

u/DSchau Sep 05 '18

The babel plugin adds some more features, but yeah, it's not required!

3

u/reyronald Sep 05 '18

The plug-in is optional and is actually a point in favor of emotion, not the other way around. These sort of plugins allow the CSS to be computed at compile time instead of runtime, resulting in a faster and more performant app.

In fact I'm surprised that SC hasn't done this. It's a huge miss