4 ms·
Since TS/Deno has native support for JSX syntax, do you think Browsers will eventually support it as well?
by ducaale 5y ago
Since TS/Deno has native support for JSX syntax, do you think Browsers will eventually support it as well?
- lucacasonato 5y agoNo, I don't think so. JSX is too proprietary and not specified well enough. It is also rather ambiguous. If you want a "no compile" JSX: ```jsx const x = <div color="red">hello</div>; // is the same as const x = h("div", { color: "red" }, "hello"); ```
- eyelidlessness 5y agoThis is more true as a mental model/to the type system, but slightly more complicated when compiled. First, there’s the “new JSX transform”, which involves auto-imports, has a different function signature, and defines fallback behavior for certain circumstances. Second, JSX is only specified as a syntax extension. Some implementations—like SolidJS and its underlying dom-expressions compiler—don’t compile to hyperscript at all.