5 ms·
React’s JSX: The Other Side of the Coin
- masswerk 11y agoNot sure about this. The irritation is about what we may expect to be another quoting level (e.g., back-ticks) is implemented as plain code. By doing so, the language specs are dramatically inflated by the addition of HTML grammar. We may note in this context that in JS the DOM-interface is _not_ part of the core language, but kept a separate implementation.
- housecor 11y ago"the language specs are dramatically inflated by the addition of HTML grammar." The language specs are unaffected. JSX is simply compiled down to JavaScript.
- kentor 11y agoJSX is a separate spec. https://facebook.github.io/jsx/ https://facebook.github.io/jsx/ "It's NOT a proposal to incorporate JSX into the ECMAScript spec itself. It's intended to be used by various preprocessors (transpilers) to transform these tokens into standard ECMAScript." Anyway, I really like this article. It pains me every time I have to deal with angular templating.