--- id: docs-syntax title: JSX Syntax description: Writing JavaScript with XML syntax. layout: docs prev: common-questions.html next: component-basics.html --- JSX is a JavaScript XML syntax extension recommended (but not required) for use with React. JSX makes code that deeply nests React components more readable, and writing it feels like writing HTML. React documentation examples make use of JSX. ## Why JSX? It seems like a terrible idea. First of all, **don't use JSX if you don't like it!** All of React's features work just fine without using JSX. Simply construct your markup using the functions on `React.DOM`. For example, here's how to construct a simple link: ```javascript var mylink = React.DOM.a({href: 'http://facebook.github.io/react'}, 'Hello React'); ``` However, we like JSX for a bunch of reasons: - 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 ## The Transform JSX transforms XML-like syntax into native JavaScript. It turns XML elements and attributes into function calls and objects, respectively. ```javascript var Nav; // Input (JSX): var app =