Nextjs having infinite errors
Hello I keep having this error and it keeps retrying and makes the page non responsive. It's almost like a useEffect kind of situation
6 Replies
What error?
So the attachment is taking some time to upload but it's
app-index.js:31 Warning: An error occurred during hydration. The server HTML was replaced with client content in <#document>.
react-dom.development.js:6779 Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server.
It's a "common" react issue
You can try disabling extensions to see if the error still happens
If not, you have to check the components
Easily Fix React Hydration Errors
React hydration is a great feature that allows your site to seamlessly transition from simple HTML to an interactive Single Page App (SPA). Unfortunately it is also easy to run into errors. In this blog post, I explain how you can fix those errors.
Okay. I'll try this. My main issue is not only that it occurs, it's that it loops infinitely
I just found it's my Navbar that's the problem
NOt sure what I did wrong. This has always worked before.
@nyx (Rustular DevRel) I have finally found the issue with it. It has to do with using
async
in client components. Not sure why it happens but
If you do
export default async function Navbar()...
It causes the infinite errors. Thank you!