Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
11–20 of 50 posts
Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
How would that work in practice, though? Using Babel JSX gets compiled to React.createElement('div', null, {}). You can configure babel to output something else if you use something other than React. So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
I wonder what made JSX seem like a good idea then.
Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
How would that work in practice, though? Using Babel JSX gets compiled to React.createElement('div', null, {}). You can configure babel to output something else if you use something other than React. So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
if would mean that jsx would look something like
function helloEl() {return jsx Hello ${name}! }
as opposed to function helloEl() {return Hello {name}! }
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 ReactDOM1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
How would that work in practice, though? Using Babel JSX gets compiled to React.createElement('div', null, {}). You can configure babel to output something else if you use something other than React. So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
Would be nice to see JSX syntax become standardized. Clearly lots of people like it.
How would that work in practice, though? Using Babel JSX gets compiled to React.createElement('div', null, {}). You can configure babel to output something else if you use something other than React. So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
http://tolmasky.com/2016/03/24/generalizing-jsx/
We use this generic-jsx in DemoKit: https://github.com/runkitdev/demokit , and it's really cool because you can do fancy stuff like:
// Curry your JSX tags!
const wordmark = ;
.... helloEarlier quoted context omitted.
How would that work in practice, though? Using Babel JSX gets compiled to React.createElement('div', null, {}). You can configure babel to output something else if you use something other than React. So what would a standardized JSX syntax output? It can't be document.createElement since that is a web API and not a generic JS API. So what would it do, exactly?
Does syntax standardization have to necessarily equate to implantation standardization?
E4X was part of Actionscript 3. It was very nice.