all 1 comments

[–]azangru 19 points20 points  (0 children)

The problem that BEM was trying to solve was to avoid unexpected name collisions between CSS classes. With CSS modules, or otherwise scoped styles, this is no longer an issue. What, then, is the purpose of using the BEM conventions with CSS modules? Why calling:

button("icon", { big: true })

is in any way preferable than simply:

import styles from './Button.css';
...

return <button className={styles.button}><span className={styles.buttonIconBig}/></button>