Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress ReactQueryDevtools hydration warnings #1613

Merged

Conversation

melanieseltzer
Copy link
Contributor

This seems to get rid of the warnings for me (tested in my own app and in the Next.js example, by linking to the local react-query). Not sure if I got all scenarios that would trigger a warning - we could add this suppression to all elements to be safe?

It can't just be at the root because it only works one level deep, so need to put it on each element directly that triggers this warning.

Closes #1543

@vercel
Copy link

vercel bot commented Jan 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/3re1rts5q
✅ Preview: https://react-query-git-fork-melanieseltzer-suppress-devtools-warnings.tannerlinsley.vercel.app

@melanieseltzer
Copy link
Contributor Author

Test passes locally 🤔

@tannerlinsley
Copy link
Collaborator

It should only be required once. Try placing it on the first actual html element in the panel component.

@melanieseltzer
Copy link
Contributor Author

So it doesn't seem to work when placing it on the first wrapping element unless I'm missing something... these are the elements I've tried putting it on (these are the only elements that have children):

Screen Shot 2021-01-09 at 10 15 22 PM

It's only working if I place it directly on the element that generates the warning (there are a couple different warnings).

@tannerlinsley tannerlinsley merged commit e3f0ad5 into TanStack:master Jan 15, 2021
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 3.5.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

persistWithLocalStorage causes content mismatch between server/client
2 participants