Update to HotReload
triggers ‘bad setState()
’ warning when server/client disagree on the initial value of useSyncExternalStore()
and application throws
#64936
Labels
bug
Issue was opened via the bug report template.
Link to the code that reproduces this issue
https://github.com/steveluscher/hot-reload-bug-repro
To Reproduce
useFoo
that usesuseSyncExternalStore()
where the initial value of the server and the client rendering mismatch (ie.getSnapshot
andgetServerSnapshot
disagree).ComponentThatThrows
, calluseFoo
and throw when the return value is the value returned on the client (ie. the value returned bygetSnapshot()
).Current vs. Expected behavior
I would expect the server rendering to appear, followed by the error boundary's fallback once the app has a chance to re-render on the client.
I do see that, but in addition to that the following warning appears on the console:
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: