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

A starter boilerplate for a universal webapp using react, redux, express and feathers
https://react-hot-example.herokuapp.com/
MIT License
635 stars 171 forks source link

Style by SCSS #508

Closed ghost closed 5 years ago

ghost commented 5 years ago

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?

S1MB10T3 commented 5 years ago

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.