Why don't we use Styled Components?
- Not framework independent: writing our CSS in our JS and using a library that supports our framework causes a lot of issues should we ever need to upgrade or switch frameworks. While we expect Ring to be a React library for a long time, when the time comes to change frameworks, it will require significant rewriting.
- Styled components can be difficult to read: Because they look like other React components it can sometimes be difficult to figure out which is which and what is going on. This can slow down onboarding and make devs less efficient.
- Styled components are compiled at runtime: This means a lot more JS over the wire and more processing time.
For more on the limitations you can read these discussions from the industry:
- Why we are Breaking Up with CSS-in-JS by Sam Magura, Maintainer of Emotion
- The React Core Team Finally Have Opinions About CSS by Oliver Williams