React render HTML by ReactDOM.render() function. ReactDOM.render() uses two parameters to render HTML.
Example:
ReactDOM.render(<h2>Hello</h2>, document.getElementById('root'));
Output of this will display in index.html root div
E.g
<body>
<div id="root"></div>
</body>
In React HTML tags uses JSX to write code in javaScript
Example:
const myelement = (
<p>hello</p>
);
ReactDOM.render(myelement, document.getElementById('root'));
JSX Full Form
JSX stands for javascript XML
- Root Node is container where the output of HTML display. Root node can be whatever we call
<body>
<header id="wow"></header>
</body>
ReactDOM.render(<p>hello</p>, document.getElementById('wow'));