State Management · Middle · Question 25 of 75
Why can a persist-ed store cause a hydration mismatch in SSR apps?
- ✓Correct answer: The server renders defaults, while the client restores different values from storage
- 2
persistsends the state to the server on every request - 3
localStorageis read on the server and blocks rendering
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.