I've never been a fan of putting CSS inside components: usually, there's like 5% of CSS that is truly specific to a component, mostly regarding its internal layout. But most of the CSS of a component tends to be global: link and button styling, font and background colours, etc.
CSS in JS is the type of hammer that turns everything into a nail, thumb and screw alike. It makes it neither easier not more convenient, to overzealously put too much styling inside a component, but it makes it feel "right" more than it actually is.
Encapsulation is almost always good in programming, but styling is one of the rare cases where we should be fighting against that intuition.
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.
I've never been a fan of putting CSS inside components: usually, there's like 5% of CSS that is truly specific to a component, mostly regarding its internal layout. But most of the CSS of a component tends to be global: link and button styling, font and background colours, etc.
CSS in JS is the type of hammer that turns everything into a nail, thumb and screw alike. It makes it neither easier not more convenient, to overzealously put too much styling inside a component, but it makes it feel "right" more than it actually is.
Encapsulation is almost always good in programming, but styling is one of the rare cases where we should be fighting against that intuition.