Which method is used to render a React component into the DOM in React 18?

React Developer Easy

React Developer — Easy

Which method is used to render a React component into the DOM in React 18?

Key points

  • ReactDOM.createRoot().render() is the method used to render a React component in React 18.
  • React.renderComponent() is not the correct method in React 18.
  • ReactDOM.render() is not the correct method in React 18.

Ready to go further?

Related questions