Hacker News new | past | comments | ask | show | jobs | submit login

It's actually a fairly small change (two new PrimaryExpressions), the spec is here:

https://github.com/facebook/jsx

Example parser from Acorn:

https://github.com/acornjs/acorn-jsx/blob/master/index.js

No part of JSX uses the DOM, it doesn't share anything with HTML.

The JS engine itself would need the modification.

Also JSX doesn't have to be for the UI, it could be for dialogs for an NPC in a game, for configs, etc.

edit: I agree with @proxyon, I'm really disappointed with HN that this simple fact is downvoted without retort.

The common sentiment here is wrong, JSX is a small extension to the grammar of JS. It is JS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: