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 (#27386)

Based on #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.

DiffTrain build for commit 925c66a.
  • Loading branch information
sebmarkbage committed Sep 18, 2023
1 parent bda552c commit 2c46007
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23998,7 +23998,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-df061b396-20230918";
var ReactVersion = "18.3.0-canary-925c66a64-20230918";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1028 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-df061b396-20230918",
version: "18.3.0-canary-925c66a64-20230918",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1227 = {
Expand Down Expand Up @@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1227 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-df061b396-20230918"
reconcilerVersion: "18.3.0-canary-925c66a64-20230918"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1228 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1070 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-df061b396-20230918",
version: "18.3.0-canary-925c66a64-20230918",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1268 = {
Expand Down Expand Up @@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1268 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-df061b396-20230918"
reconcilerVersion: "18.3.0-canary-925c66a64-20230918"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1269 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-canary-df061b396-20230918";
var ReactVersion = "18.3.0-canary-925c66a64-20230918";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-df061b396-20230918";
exports.version = "18.3.0-canary-925c66a64-20230918";
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-df061b396-20230918";
exports.version = "18.3.0-canary-925c66a64-20230918";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
df061b396644bb7c27ea76bb27ae09784ce6444b
925c66a6472a61e7174dabf6c697a9a320ebc170

0 comments on commit 2c46007

Please sign in to comment.