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

NavBar's isServer() check is a reason for 'expected HTML to contain a <div></div>...' warning? #34

Open
tmelent opened this issue Apr 25, 2021 · 1 comment

Comments

@tmelent
Copy link

tmelent commented Apr 25, 2021

Hello. In NavBar.tsx, in this hook: const [{ data, fetching }] = useMeQuery({pause: isServer()}); pause thing seems to cause expected HTML to contain a <div></div>... warning. Is there any way to get rid of this warning? I asked on Stack Overflow: https://stackoverflow.com/questions/67256421/is-there-any-way-to-suppress-hydration-warning-in-react-fc, and there is one answer about server and client pause should be the same, but this solution works weird for me.

@nbar1
Copy link

nbar1 commented May 26, 2021

if (isServer() || fetching) {

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

No branches or pull requests

2 participants