News for hackers. Stuff that matters.
Re:JavaScript once had a JSX-like syntax called E4X by benjaminjackman on Saturday March 18, 2017 @01:22PM (#13902343)
Perhaps providing a parser from something like the tagged template literals[1] from e.g. 'tag `string interpolation`' could be used. For ones lacking a tag, a specially named variable could be looked for (e.g. something like __xml_parser__ ) , it would be up to the program to set that global.

if would mean that jsx would look something like

    function helloEl() {return jsx <div> Hello ${name}! </div>}
as opposed to

    function helloEl() {return <div> Hello {name}! </div>}
It would be a bit different though in what is actually going on though. The top example would just desugar to

    jsx.div(`Hello ${name}`)
jsx would be looked up like any other variable. So you could just define it in global scope to point to ReactDOM

1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

There are no comments on this comment yet.