Описание тега react-jsx

JSX is a JavaScript XML syntax transform recommended for use with React.

React and JSX

reactjs and react-jsx (not to be confused with jsx) are independent technologies, but JSX was primarily built with React in mind. The two valid uses of JSX are:

  • To construct instances of React DOM components (React.DOM.*).
  • To construct instances of composite components created with React.createClass().

Why JSX?

React works out of the box without JSX. Simply construct your markup using the functions on React.DOM. For example, here's how to construct a simple link:

var link = React.DOM.a({href: 'http://facebook.github.io/react'}, 'React');

The advantages when using JSX are:

  • It's easier to visualize the structure of the dom.
  • Designers are more comfortable making changes.
  • It's familiar for those who have used mxml or xaml.