DEV Community 👩‍💻👨‍💻

Discussion on: Building a CSS-in-JS library from scratch

thom4s profile image

(irony on)
That is so much more readable than
h1 {
font-size: 24px;
font-weight: 600 }
(irony off)

i honelsty don't understand that css-in-js thing. It is an absolute non-sense to me. Facebook's engineers told us one day to write css like that... and well, some of us write like that.
I don't see any "pros" in that method...

thomascullen profile image
Thomas Cullen Author

To be honest I find that most of the benefits are more in the developer experience side of things. A lot of people don't like it and that's fair enough. If you aren't a fan then there is no need to go near it. I personally find that it fits my mental model when building component libraries and enjoy working with it.