Skip to content

Do not replay erroring beginWork with invokeGuardedCallback when suspended or previously errored#24480

Merged
gnoff merged 1 commit into
facebook:mainfrom
gnoff:suppress-uncaught-sibling-errors
May 3, 2022
Merged

Do not replay erroring beginWork with invokeGuardedCallback when suspended or previously errored#24480
gnoff merged 1 commit into
facebook:mainfrom
gnoff:suppress-uncaught-sibling-errors

Conversation

@gnoff
Copy link
Copy Markdown
Collaborator

@gnoff gnoff commented May 2, 2022

When hydrating a suspense boundary an error or a suspending fiber can often lead to a cascade of hydration errors. While in many cases these errors are simply discarde (e.g. when the root does not commit and we fall back to client rendering) the use of invokeGuardedCallback can lead to many of these errors appearing as uncaught in the browser console. This change avoids error replaying using invokeGuardedCallback when we are hydrating a suspense boundary and have either already suspended or we have one previous error which was replayed.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants