DEV Community

Discussion on: Why do we keep talking about CSS-in-JS?

Collapse
 
chiangs profile image
Stephen Chiang • Edited

With React scripts 2.0+ all you need to do to get going with CSS modules is just change the name of the style sheet to have .module. in the name.

For example button.module.css/scss/sass/etc.

Couple that with a global index.css, BEM conventions, and use css variables, keeps everything pretty easy and manageable for the way I do things.

Collapse
 
siddharthkp profile image
Sid

all you need to do to get going with CSS modules is just change the name of the style sheet to have .module. in the name.

That's amazing!