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:

ReactJS

Tagged in:

, , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock