What is JSX ?

  • 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 );


 Create an element using JSX:

const container = (


  <p>Welcome to kaashiv</p>




Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like

What is Prop Drilling ?

We pass a prop with another component with the help of all the components that come between, this method is known as prop drilling. Prop drilling is basically a situation…
View Answer

What is React DOM ?

It is an object which exposes a number of top level APIs to interact with the browser DOM. It provides DOM-specific methods that can be used at the top level…
View Answer