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.
.module.
For example button.module.css/scss/sass/etc.
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.
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!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
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.
That's amazing!