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

JSX isn't markup - it's XML which translates to Reacts internal representation which looks something like:

<div className='foo'>bar</div> -->

React.DOM.div({ className: 'foo', children: 'bar' })

You don't have to use it - it's a convenience provided for designers (and arguably developers who have realised that templating provides a false separation of concerns). Om notably (https://github.com/swannodette/om) ignores it.




"JSX isn't markup - it's [Extensible Markup Language]"?


JSX isn't markup, it's a compiler that transforms common HTML-like to custom React.DOM objects. From the doc [0]:

> JSX transforms from an XML-like syntax into native JavaScript.

[0] http://facebook.github.io/react/docs/jsx-in-depth.html


Sorry, to be clearer, I meant it isn't HTML.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: