-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Describe the bug
The devtools cause a hydration error because the state values that depend on localStorage are not equal to the state values returned from the server. We should make sure that these state values are only set after the client has mounted, so on a useEffect() and not a direct call to localStorage.
https://github.com/tannerlinsley/react-query/blob/master/src/devtools/devtools.tsx#L337
To Reproduce
Add dev client, have something in localStorage, refresh.
Expected behavior
No hydration error.
Metadata
Metadata
Assignees
Labels
No labels