You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fizz] improve Hoistable handling for Elements and Resources inside Suspense Boundaries (#28069)
Updates Fizz to handle Hoistables (Resources and Elements) in a way that
better aligns with Suspense fallbacks
1. Hoistable Elements inside a fallback (regardless of how deep and how
many additional boundaries are intermediate) will be ignored. The
reasoning is fallbacks are transient and since there is not good way to
clean up hoistables because they escape their Suspense container its
better to not emit them in the first place. SSR fallbacks are already
not full fidelity because they never hydrate so this aligns with that
somewhat.
2. Hoistable stylesheets in fallbacks will only block the reveal of a
parent suspense boundary if the fallback is going to flush with that
completed parent suspense boundary. Previously if you rendered a
stylesheet Resource inside a fallback any parent suspense boundaries
that completed after the shell flushed would include that resource in
the set required to resolve before the boundary reveal happens on the
client. This is not a semantic change, just a performance optimization
3. preconnect and preload hoistable queues are gone, if you want to
optimize resource loading you shoudl use `ReactDOM.preconnect` and
`ReactDOM.preload`. `viewport` meta tags get their own queue because
they need to go before any preloads since they affect the media state.
In addition to those functional changes this PR also refactors the
boundary resource tracking by moving it to the task rather than using
function calls at the start of each render and flush. Tasks also now
track whether they are a fallback task
supercedes prior work here: #27534
DiffTrain build for commit 554fc49.
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -25607,7 +25607,7 @@ if (__DEV__) {
25607
25607
return root;
25608
25608
}
25609
25609
25610
-
var ReactVersion = "18.3.0-canary-1c958aa4a-20240130";
25610
+
var ReactVersion = "18.3.0-canary-554fc49f4-20240130";
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2
Original file line number
Diff line number
Diff line change
@@ -9149,7 +9149,7 @@ var devToolsConfig$jscomp$inline_1029 = {
9149
9149
throwError("TestRenderer does not support findFiberByHostInstance()");
9150
9150
},
9151
9151
bundleType: 0,
9152
-
version: "18.3.0-canary-1c958aa4a-20240130",
9152
+
version: "18.3.0-canary-554fc49f4-20240130",
9153
9153
rendererPackageName: "react-test-renderer"
9154
9154
};
9155
9155
varinternals$jscomp$inline_1205={
@@ -9180,7 +9180,7 @@ var internals$jscomp$inline_1205 = {
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2
Original file line number
Diff line number
Diff line change
@@ -9577,7 +9577,7 @@ var devToolsConfig$jscomp$inline_1071 = {
9577
9577
throwError("TestRenderer does not support findFiberByHostInstance()");
9578
9578
},
9579
9579
bundleType: 0,
9580
-
version: "18.3.0-canary-1c958aa4a-20240130",
9580
+
version: "18.3.0-canary-554fc49f4-20240130",
9581
9581
rendererPackageName: "react-test-renderer"
9582
9582
};
9583
9583
varinternals$jscomp$inline_1246={
@@ -9608,7 +9608,7 @@ var internals$jscomp$inline_1246 = {
0 commit comments