Closed ishaan1013 closed 1 year ago
Adding the component into the root layout gives a hydration error.
app/layout.js:
app/layout.js
import NextTopLoader from 'nextjs-toploader'; export default function RootLayout({ children }) { return ( <html lang="en"> <body> <NextTopLoader /> {children} </body> </html> ); }
Putting <NextTopLoader /> into a client component and using that in the root layout gives the same error.
<NextTopLoader />
I figured out the issue, so providers should be inside the body component...
Adding the component into the root layout gives a hydration error.
app/layout.js
:Putting
<NextTopLoader />
into a client component and using that in the root layout gives the same error.