Skip to content

Commit

Permalink
Do not replay erroring beginWork with invokeGuardedCallback when susp…
Browse files Browse the repository at this point in the history
…ended or previously errored

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 discarded (e.g. when teh 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 branch information
gnoff committed May 3, 2022
1 parent ce13860 commit 710429e
Show file tree
Hide file tree
Showing 5 changed files with 468 additions and 9 deletions.
Loading

0 comments on commit 710429e

Please sign in to comment.