React 19 breaks surpress-nextjs-warning and hydration problems with color scheme #6841
devdave
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Who knows when React 19 will release, except "soon", but when it does I ran into problems with this:
https://github.com/mantinedev/mantine/blob/00a94ceefc22c80ad08af73acb943f8f0c01d662/packages/%40mantine/core/src/core/MantineProvider/suppress-nextjs-warning.ts because React 19 adds the error description plus all hydration problems into one big message.
With that broken, I think this breaks hydration https://github.com/mantinedev/mantine/blob/00a94ceefc22c80ad08af73acb943f8f0c01d662/packages/%40mantine/core/src/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.tsx
I kind of understand what ColorSchemeScript is doing so would it be an easy fix to try and implement this pattern https://nextjs.org/docs/messages/react-hydration-error#solution-1-using-useeffect-to-run-on-the-client-only to prevent adding the script and having it run.
I checked issues but wasn't able to find any mention of this impending problem.
Beta Was this translation helpful? Give feedback.
All reactions