The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
Documentation
Their website is awesome. In my opinion, it is already up to the styled-components standard.
Features
I like the css prop: https://emotion.sh/docs/css-prop
I don’t like the JSX Pragma but that’s not needed when the babel plugin is used.
And obviously styled.
Past problems like global CSS have been solved.
Speed
All the benchmarks I’ve found are from old versions. We can’t say one or the other is faster although historically emotion has been faster in the past.
Speed
All the benchmarks I’ve found are from old versions. We can’t say one or the other is faster although historically emotion has been faster in the past.
It looks like speed is not something that we can take into accounts, as it’s not clear which one is faster now. They are probably quite similar:
orballo5
I’d go with emotion. Actually I’d try to see if there is a pattern that would let us avoid using @emotion/styled and that we’d be happy with it as well. This way we’d be saving some bytes and also stop thinking about how to name every single styled element
I won’t do that. It’s already a widely known API and it would cause lots of problems to Frontity devs coming from styled-components and expecting it or reading about it in the emotion docs.
Other than that, I think I prefer emotion as well.
orballo7
They could install the @emotion/styled package anyway right? I mean, we can specify this in the docs and let the developers choose if they want to install the styled version.
David8
I don’t have a strong preference for any of those libraries. We used both of them and I didn’t notice any difference when using styled, their APIs are really similar.
If I have to choose one, I think I would opt for emotion (it has a smaller bundle size and is react-concurrent ready).