What is JSX?

What is JSX?

In the past we used to put javascript to HTML but JSX allow us to put HTML to Js. JSX is XML/HTML like syntax structure used by React which extends Ecmascript so that HTML and XML like code can exist with Javascript/React code. It actually creates a DOM (Document Object Model) like structure through which in the same file you can write Javascript code. For e.g.:
var nav = ( <ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Clients</a></li> <li><a href="#">Contact Us</a></li> </ul> );