• JSX is known as JavaScript XML.
  • This file makes the React application robust.
  • Boosts its performance.
  • We can write HTML structures in the same file that contains JavaScript code,while using JSX.
  • It is easy to understand in HTML file.
  • It is like XML/HTML, JSX tags have a tag name, attributes, and children.

Let’s see how JSX works:

 Create an element without using JSX.

const text = React.createElement('p', {}, 'Welcome to kaashiv');

const container = React.createElement('div','{}',text );

ReactDOM.render(container,rootElement);

 Create an element using JSX:

const container = (

<div>

  <p>Welcome to kaashiv</p>

</div>

);

ReactDOM.render(container,rootElement);

Categorized in: