Pros and cons
What Emotion does especially well — and the limits to anticipate.
Pros
- More performant than styled-components
- Two modes: styled and css
- Compatible with React and other frameworks
- Used by MUI (stability guarantee)
Cons
- Runtime overhead vs Tailwind CSS
- Fewer resources than styled-components
- Sometimes more complex setup
Emotion: when it makes sense.
Meilleur que styled-components si tu dois faire du CSS-in-JS, mais Tailwind reste plus rapide.
Keep if
Tu veux du CSS-in-JS plus performant que styled-components. Tu utilises MUI et veux rester cohérent avec son stack
Challenge if
Tu utilises Tailwind CSS (pas besoin de CSS-in-JS). Tu démarres un nouveau projet sans contrainte de CSS-in-JS
