flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Add suppressHydrationWarning for nextJS

Open sylwit opened this issue 3 months ago • 4 comments

Using darkMode can lead to an hydratation warning.

As described in nextjs doc While rendering your application, there was a difference between the React tree that was pre-rendered from the server and the React tree that was rendered during the first render in the browser (hydration).

https://nextjs.org/docs/messages/react-hydration-error

https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app

Summary by CodeRabbit

  • Documentation
    • Updated the Next.js guide to include information on suppressing hydration warnings in RootLayout and Document components.

sylwit avatar Mar 31 '24 15:03 sylwit