Skip to content

Commit

Permalink
[Fizz] Client render the nearest child or parent suspense boundary if…
Browse files Browse the repository at this point in the history
… replay errors or is aborted (facebook#27386)

Based on facebook#27385.

When we error or abort during replay, that doesn't actually error the
component that errored because that has already rendered. The error only
affects any child that is not yet completed. Therefore the error kind of
gets thrown at the resumable point.

The resumable point might be a hole in the replay path, in which case
throwing there errors the parent boundary just the same as if the replay
component errored. If the hole is inside a deeper Suspense boundary
though, then it's that Suspense boundary that gets client rendered. I.e.
the child boundary. We can still finish any siblings.

In the shell all resumable points are inside a boundary since we must
have finished the shell. Therefore if you error in the root, we just
simply just turn all incomplete boundaries into client renders.
  • Loading branch information
sebmarkbage authored and AndyPengc12 committed Apr 15, 2024
1 parent 99d4987 commit a617072
Show file tree
Hide file tree
Showing 3 changed files with 760 additions and 75 deletions.
Loading

0 comments on commit a617072

Please sign in to comment.