3 ms·
The jsx is there primarily for better typescript support and react-like api. Internally it compiles down to template literals, so the same advantages apply. T
by lf-non 4y ago
The jsx is there primarily for better typescript support and react-like api.
Internally it compiles down to template literals, so the same advantages apply.
The typescript support for lit is lagging to say the least. It is surprising that there is still no good official support for type-checking of templates. There are a few community projects though but they are not as reliable and the DOM/Web Component API doesn't make it easy to make fully type-safe APIs.
Solid being able to lean in the JSX support in the TS compiler and not tying itself to custom elements api is able to offer a much better DX here.