DEV Community

Discussion on: Intro to Styled Components for your React App

Collapse
 
dastasoft profile image
dastasoft

Nice article!

I use styled-components by default in most of my projects but there are a few downsides to mention:

  • The resultant CSS can be bigger than doing in regular CSS, adds a lot of prefixes (which in fact it's also a good point because you have great compatibility between browsers)
  • Hot reload works better with plain CSS, in a CRA if you only change things in CSS the page don't get reloaded, with styled-components or any other CSS-in-JSS needs to compile again.
  • Like in other tools like TailwindCSS I find styled-components need to be used by a person who has a good sense of organization because it's easier to repeat things if you don't have care

Aside from the downsides I think styled-components are a very handy tool.

Collapse
 
olenadrugalya profile image
Olena Drugalya

Thank you for your useful comments :)