React Programming

Hands On No. 3 : Rendering in React

Rendering in React

In order to render a component or an element, you need to first create a root element using ReactDOM.createRoot() and then render your element/component in that root using root.render(). See the code in the index.js file below: