4 ms·
> The fundamental difference is what you have in the end. With JSX you have function calls Check out the output of the Babel plugin mentioned in the readme >
by magicalist 8y ago
> The fundamental difference is what you have in the end. With JSX you have function calls
Check out the output of the Babel plugin mentioned in the readme
> // input:
> html`<div id="foo">hello ${you}</div>`
> // output:
> React.createElement("div", { id: "foo" }, "hello ", you)
options
https://www.npmjs.com/package/babel-plugin-htm https://www.npmjs.com/package/babel-plugin-htm
- dmitriid 8y agoIt's (marginally) better than having it at runtime. Poor man's macros. Much like JSX in a sense, though JSX is a much thinner abstraction IMO.