--- id: jsx-in-depth title: JSX in Depth layout: docs permalink: jsx-in-depth.html prev: displaying-data.html next: jsx-gotchas.html --- JSX is a JavaScript XML syntax transform recommended for use with React. > Note: > > Don't forget the `/** @jsx React.DOM */` pragma at the beginning of your file! This tells JSX to process the file for React. > > If you don't include the pragma, your source will remain untouched, so it's safe to run the JSX transformer on all JS files in your codebase if you want to. ## 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: ```javascript var link = React.DOM.a({href: 'http://facebook.github.io/react'}, 'React'); ``` We recommend using JSX for many 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 from an XML-like syntax into native JavaScript. XML elements and attributes are transformed into function calls and objects, respectively. ```javascript var Nav; // Input (JSX): var app =