Hydration error
Answered
Cimarrón Uruguayo posted this in #help-forum
Cimarrón UruguayoOP
import NavBar from '@/components/navbar'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html>
<NavBar />
<body>{children}</body>
</html>
)
}
export default function Page() {
return <>Home Page</>
}
export default function NavBar() {
return <>Navbar</>
}
These are the only files, why am i still getting a hydration error?
12 Replies
Can you first try on icogonito?
I heard it happens due to extension sometimes
Cimarrón UruguayoOP
nah
i think i found the issue
but idk why its the issue
Cimarrón UruguayoOP
moving <NavBar /> inside the body fixed it
Answer
Wait, Navbar is supposed to be inside body only
I didn't notice it
You can mark this as a solution
Cimarrón UruguayoOP
why
All Visual elements are supposed to be inside body
Cimarrón UruguayoOP
thanks