React Render HTML code example
Example 1: React Render HTML
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<p>Hello</p>, document.getElementById('root'));
Example 2: how to render in react
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));