React · Junior · Question 30 of 75

When does a child component re-render by default?

Explanation

A parent render re-renders the whole subtree by default. Other causes: a change in its own state and a change in a context it reads. React.memo (or the React Compiler automatically) lets you skip rendering when props are equal. A re-render isn't a DOM change: the DOM changes only if there's a difference.

Further reading

Problem with a question

React · Junior · question 30

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz