Put in order · JavaScript and React course · Module 1: React Basics
Rendering a React application
Arrange the syntax for rendering the App component to the DOM in main.jsx (React 18+):
Items to put in order
- ReactDOM.createRoot(
- ).render(
- document.getElementById('root')
- <App />
- )
Show the answer
Correct order:
- ReactDOM.createRoot(
- document.getElementById('root')
- ).render(
- <App />
- )