Using BEM in clean way is very tedious. You should manage a huge number of classes per each compnent: element class, modificators classes, classes from block determine positon current element as a child. And this mess grown up with some extra logic. React example:
Why BEM when we have CSS modules? Modern frontend grownup in way Less CSS more clean code
BEM was cool but after CSS modules appear it dead. Migration from BEM to CSS modules is the best thing that can happen with the project.
Using BEM in clean way is very tedious. You should manage a huge number of classes per each compnent: element class, modificators classes, classes from block determine positon current element as a child. And this mess grown up with some extra logic. React example:
There is no way to use BEM without extra tools like
bem / bem-react
A set of tools for developing user interfaces using the BEM methodology in React.
bem-react ·
A set of tools for developing user interfaces using the BEM methodology in React. BEM React supports TypeScript type annotations.
Packages
Contribute
Bem React Core is an open source library that is under active development and is also used within Yandex.
If you have suggestions for improving the API, you can send us a Pull Request.
If you found a bug, you can create an issue describing the problem.
For a detailed guide to making suggestions, see: CONTRIBUTING.md.
License
© 2018 Yandex. Code released under Mozilla Public License 2.0.
But any tool is extra abstraction in your code
This might be a holywar... At least, there are different opinions about it, such as andrejgajdos.com/css-modules-vs-cs... or medium.com/@perezpriego7/css-evolu....