instead of putting JavaScript into HTML,
JSX allows us to put HTML into JavaScript.
JSX stands for JavaScript XML.
It is simply a syntax extension of React.
It allows us to directly write HTML in React.
const element = <h1>Hello World</h1>
// JSX Syntax and JavaScript in react
// JSX is a syntax extension of JavaScript. It’s used to create DOM elements which are then rendered in the React DOM.
// A JavaScript file containing JSX will have to be compiled before it reaches a web browser. The code block shows some example JavaScript code that will need to be compiled.
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<h1>Render me!</h1>, document.getElementById('app'));