Error: Hydration failed because the initial UI does not match what was rendered on the server
Answered
Yellow-horned horntail posted this in #help-forum
Yellow-horned horntailOP
I am getting this error when navigating to
Here is my code:
https://github.com/skzhengkai/hyunGPT-Dashboard-Shadcn/tree/main/app/dashboard
/dashboard when signed in.Here is my code:
app/dashboard/...https://github.com/skzhengkai/hyunGPT-Dashboard-Shadcn/tree/main/app/dashboard
9 Replies
Yellow-horned horntailOP
Thank you
Answer
https://nextjs.org/docs/messages/react-hydration-error#solution-2-disabling-ssr-on-specific-components
or you can use this option as well
or you can use this option as well
Yellow-horned horntailOP
like this?
<body suppressHydrationWarning
className={cn(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable
)}
>sure, give it a try
Yellow-horned horntailOP
I think it worked, thanks!
Original message was deleted
Sounds good @Yellow-horned horntail
Mark solution!
Mark solution!