React · Senior · Question 5 of 75

What happens during hydration?

Explanation

hydrateRoot walks the existing DOM, renders components on the client and expects the same markup, so it can simply "bring it to life". Until hydration finishes, the UI is visible but not interactive. If the markup doesn't match, you get a hydration error and the subtree is re-rendered on the client.

Further reading

Problem with a question

React · Senior · question 5

Test yourself

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

Take this quiz