Answer the question
In order to leave comments, you need to log in
How to build styles in react?
Hello.
Just starting to learn react + webpack and later redux.
The idea is to make a component with styles, and after the whole page is laid out, collect all the styles into one file and save it. Well, i.e. for example, there is a CatalogItem component; it has its own styles related only to it and NewsItem with its own styles. Well, in addition to these styles, there are styles for the entire site in a separate component, for example, App. We place on the page at /catalog/ CatalogItem, and on the page with url /news/ NewsItem. And after generating the page, we get a css file separate for /catalog/ and separate for /news/ and load only the file that we need depending on.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question