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] Reuse rootSegmentID as the SuspenseBoundaryID (#27387)
Originally the intension was to have React assign an ID to a user
rendered DOM node inside a `fallback` while it was loading. If there
already were an explicit `id` defined on the DOM element we would reuse
that one instead. That's why this was a DOM Config option and not just
built in to Fizz.
This became tricky since it can load late and so we'd have to transfer
it down and detect it only once it finished rendering and if there is no
DOM element it doesn't work anyway. So instead, what we do in practice
is to always use a `<template>` tag with the ID. This has the downside
of an extra useless node and shifting child CSS selectors.
Maybe we'll get around to fixing this properly but it might not be worth
it.
This PR just gets rid of the SuspenseBoundaryID concept and instead we
just use the same ID number as the root segment ID of the boundary to
refer to the boundary to simplify the implementation.
This also solves the problem that SuspenseBoundaryID isn't currently
serializable (although that's easily fixable by itself if necessary).
DiffTrain build for commit 2807d78.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23998,7 +23998,7 @@ function createFiberRoot(
23998
23998
return root;
23999
23999
}
24000
24000
24001
-
var ReactVersion = "18.3.0-canary-925c66a64-20230918";
24001
+
var ReactVersion = "18.3.0-canary-2807d781a-20230918";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1028 = {
8620
8620
throwError("TestRenderer does not support findFiberByHostInstance()");
8621
8621
},
8622
8622
bundleType: 0,
8623
-
version: "18.3.0-canary-925c66a64-20230918",
8623
+
version: "18.3.0-canary-2807d781a-20230918",
8624
8624
rendererPackageName: "react-test-renderer"
8625
8625
};
8626
8626
varinternals$jscomp$inline_1227={
@@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1227 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1070 = {
9046
9046
throwError("TestRenderer does not support findFiberByHostInstance()");
9047
9047
},
9048
9048
bundleType: 0,
9049
-
version: "18.3.0-canary-925c66a64-20230918",
9049
+
version: "18.3.0-canary-2807d781a-20230918",
9050
9050
rendererPackageName: "react-test-renderer"
9051
9051
};
9052
9052
varinternals$jscomp$inline_1268={
@@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1268 = {
0 commit comments