Update before hydration completed error does not clarify which suspense boundary or which update
flyon opened this issue · 3 comments
Error in question:
Uncaught Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.
The current error gives no indication which part of the code causes the error, making it very hard to debug.
Two suggestions / questions:
Indicate which suspense boundary
Is there any way to indicate which suspense boundary received an update? Showing the component tree like in other errors would be a very helpful first step.
Indicate which update
Even better of course would be if there could be any indication which update was triggered, with a call stack.
should I just ignore the error?
Yeah I have been getting this error a lot of times nowadays.
It happened with me for dynamic import so just stopped using it.
The only way to debug is try commenting out parts that you have changed just before you started seeing this error.
Most of the time time what I would be missing is a useEffect
hook
The only way to debug is try commenting out parts that you have changed just before you started seeing this error.
Well, this came up when I migrated an app to Next.JS 13 / React 18 😅 So, essentially I touched everything.
I will get by, but I hope a proper trace is added