State Management · Middle · Question 25 of 75

Why can a persist-ed store cause a hydration mismatch in SSR apps?

Explanation

The server has no localStorage, so its HTML uses initial values. Wait for hydration (persist.hasHydrated()/onFinishHydration) before showing persisted values, or render them only on the client.

Further reading

Problem with a question

State Management · Middle · question 25

Test yourself

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

Take this quiz