by troupo · 2w ago · 0 comments
Because it's a thin wrapper directly translatable into a JS function call. `className` is JS
Given that its taken the world by fire and nearly everyone adopted JSX/TSX as the templating language, doesn't seem like developer experience suffered.
> Like useMemo, that now is compiled in automatically
A completely different beast, and this one definitely makes DX suffer.
React opted for backwards compatibility at the time it came out, and never made the upgrade - you can write `class` in Preact.
I think they opted for what these properties are actually called in Javascript: https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...
I wish they'd stick with that for all properties though.