3 ms·
The style I like to use is the css/scss webpack loader. Basically, you import a .scss file into your .jsx. The scss is compiled and at the same time imported in
by Lyren 9y ago
The style I like to use is the css/scss webpack loader.
Basically, you import a .scss file into your .jsx.
The scss is compiled and at the same time imported into .jsx as a hashmap where the key is your scss class-name & the value is the compiled class-name. I think this sounds like what you're looking for since it keeps jsx & css in their respective files but still being coupled into their own component which is easier to reason about.
http://javascriptplayground.com/blog/2016/07/css-modules-webpack-react/ http://javascriptplayground.com/blog/2016/07/css-modules-web...