Answer the question
In order to leave comments, you need to log in
How to correctly include styles in React?
There is a ready-made layout, for styles - SASS. And as usual: the general style file is included in the header.
Now the task is to rewrite everything with React components.
And here's the question: how to properly organize their connection? Leave as is or inline?
What do you recommend (method, tools)? What can be pitfalls?
Answer the question
In order to leave comments, you need to log in
Have a look at the solution used for example here:
https://github.com/anorudes/redux-easy-boilerplate
Allows you to import sass and encapsulate it.
Take a look at /src/components/Items
for a better understanding
. You can write any nesting in the sass file itself.
That is, you can write:
:local(.styles) {
.title {
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question