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!
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. :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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!
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. :)