I know WHY it’s not possible, but that’s a design limitation of the parser being templating on top of JS, instead of a separate DSL with escape hatches for JS, like most other templating engines
It's not really a design limitation, as this way it simplifies the parser, the DSL, the templating... Basically everything. And your entire templating/parsing could be just "convert this to a function call"
> Yes, it simplifies the engine, at the cost of developer experience.
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.
The rationale was to follow the DOM property names to avoid clashing with reserved keywords; not because mirroring JS was the goal. Data attributes for example have always been data-*, readonly, contenteditable in lowercase, mirroring HTML.
Because it's a thin wrapper directly translatable into a JS function call. `className` is JS