Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
msdsk19012dI honestly can't understand why people want to put css in js, unless your library has some smart way of abstracting it - like vue.js. And even then I use it only for particular modules, because the C part is actually important and anybody not using cascade is actually just needlessly gimping themselves.
I always separate my CSS into it's own file.
I've seen many React-Native apps and VueJS cases where they have the CSS written in the same file as the html (jsx w/e) or the JS, which just seems like a pain. Why would I want one large ass file when we have been taught from the very beginning about importing our CSS from separate files?
Even in the case of Styled-Components, such as EmotionJS, I still keep the CSS in a separate file and import it to where I want to use it.
It's just far more maintainable that way.