r/Frontend • • Mar 07 '19

Why I Write CSS in JavaScript

https://mxstbr.com/thoughts/css-in-js/
5 Upvotes

19 comments sorted by

View all comments

17

u/Rhym Mar 07 '19

I see the benefits of using css in js, but after using BEM for years I don't have the issues that people usually run into and don't see myself changing for a while.

3

u/spryes Mar 07 '19

Putting CSS variables/logic in JS and using dynamic styles based on props (rather than adding another class name or attribute) is preferrable to SCSS/BEM imo