DEV Community

Discussion on: How do you manage your sass/scss or any other styling files on react?

Collapse
 
s_aitchison profile image
Suzanne Aitchison

We keep our components in folders, with their own Sass style file in there with them. And then additionally global Sass and variables files at the top level. I quite like this structure as it keeps component styles separate but doesn't pollute the JS with styling code.

I've noticed more people seem to be moving towards declaring their component styles in the JS though and would be keen to know why!

Collapse
 
raisaugat profile image
Saugat Rai

I also like the idea of placing the Sass file in the same component where it is use.
Using styled component is quite useful, but I think it makes the jS file very long.
Anyways, thanks for you opinion. :)