Answer the question
In order to leave comments, you need to log in
How to use Bootstrap, BEM and React?
There is a React application that has many components, each component has its own scss file:
list.js
list.scss
module.js
module.scss
<ul class="cars-list">
<li class="cars-list__car">one</li>
<li class="cars-list__car">two</li>
</ul>
.cars-list {
properties...
&__car {
properties...
}
.cars-list {
@extend .list-group;
&__car {
@extend .list-group-item;
color: gray;
}
Answer the question
In order to leave comments, you need to log in
You can use react-bootstrap.github.io
Alternatively, move away from BEM and switch to css in js .
I myself use and recommend Styled Components in my work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question