bertho-zero/react-redux-universal-hot-example

Style by SCSS

Closed this issue · 1 comments

Hi everyone, by using this structure. How can we style scss by import file scss in component
example:
I have home.scss in home component. I just want to import ./home.scss into home.js to style css

So how can we do that in this project, I know we must modify the webpack. Anyone have idea?

You probably figured it out by now(Because it's in the Readme), but for future reference just add const styles = require('./home.scss'); in home.js render.

To give a element a style add className={styles.classstyle} as an attribute.