B
B
Behel2015-11-10 21:46:40
JavaScript
Behel, 2015-11-10 21:46:40

How to properly work/include sass/css in React.js?

Hello.
I decided to try to do something on react.js. Immediately there was a problem how to work with styles?

  • How to connect them so that there is modularity, for example, if the component is not used, then the corresponding style is not loaded;
  • To load a certain main.css style in which variables for component styles are specified;
  • So that there are no problems with repeating classes, etc.;
  • Perhaps there are still obvious things that I have not yet reached.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-11-10
@Behel

You don't have to worry too much about styles. It is enough to minify everything into 1 file, compress and load it with the 1st request. If you still really want to, then Webpack can do this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question