Recall & Review
beginner
What is the purpose of rendering elements in React?
Rendering elements means showing React components or HTML on the screen so users can see and interact with them.
Click to reveal answer
beginner
How do you render a simple element in React?
You use ReactDOM.createRoot to select a place in the HTML, then call root.render() with a React element like
Hello
.Click to reveal answer
beginner
What does ReactDOM.createRoot(document.getElementById('root')).render(<App />) do?
It finds the HTML element with id 'root' and shows the <App /> component inside it on the page.
Click to reveal answer
intermediate
Can React render multiple elements at once?
React renders one root element at a time, but that element can contain many nested elements inside it.
Click to reveal answer
intermediate
Why should React elements be immutable?
React elements are like snapshots of the UI. They don’t change after creation, which helps React update the screen efficiently.
Click to reveal answer
Which method is used to render a React element into the DOM?
✗ Incorrect
ReactDOM.createRoot(...).render() is the correct way to render React elements in React 18+.
What does React render on the screen?
✗ Incorrect
React renders HTML elements and components that describe the UI.
Where do you usually render your React app in the HTML file?
✗ Incorrect
The common practice is to render React inside a div with id 'root' in the HTML body.
Can you render multiple root elements directly in React?
✗ Incorrect
React expects a single root element to render; nested elements can be inside it.
Why are React elements considered immutable?
✗ Incorrect
React elements don’t change after creation; this helps React update the UI efficiently.
Explain how React renders elements to the screen starting from the HTML file.
Think about how React connects JavaScript code to the HTML page.
You got /4 concepts.
Describe why React elements are immutable and how this helps React update the UI.
Consider how React knows what parts of the screen to update.
You got /4 concepts.