Skip to content

Comment on Show HN: Belle – Configurable React Components with Great UX

Comments

Congratulations Jyoti and Nik. I'm curious what the folks over here think about the choice to put styling in js.

Hey Iwein, there are couple fundamental issue with the way we style HTML elements today. CSS is exposing every declaration into a global namespace. This makes it to eliminate dead code as it is hard to figure out where it is used. Many techniques like BEM were invented and declared as "the right way" to do styling.

I don't know if inline-styles defined in JS are the end-game, but working with it in combination with building components turned out to be working way better for us than using CSS.

If you want to know more about it I highly recommend this slidedeck: https://speakerdeck.com/vjeux/react-css-in-js

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.