Re:Hyperscript Tagged Markup: JSX alternative using standard...
by magicalist on Thursday November 22, 2018 @04:27PM
(#18512688)
> 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
Re:Hyperscript Tagged Markup: JSX alternative using standard...
by dmitriid on Friday November 23, 2018 @03:31AM
(#18515157)
It'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.
Re:Hyperscript Tagged Markup: JSX alternative using standard...
by rickycook on Thursday November 22, 2018 @04:17PM
(#18512628)
and i think this is the point; runtime vs compile time! similar reasons that people love the popular new type systems... if it compiles, it probably works or you get an error rather than pushing that later and possibly not catching it
With tagged literals you end up with runtime string parsing and concatenation.