Skip to content

Commit aaf4f7a

Browse files
committed
Consume the RSC stream twice in the Flight fixture (#28353)
We have an unresolved conflict where the Flight client wants to execute inside Fizz to emit side-effects like preloads (which can be early) into that stream. However, the FormState API requires the state to be passed at the root, so if you're getting that through the RSC payload it's a Catch 22. #27314 used a hack to mutate the form state array to fill it in later, but that doesn't actually work because it's not always an array. It's sometimes null like if there wasn't a POST. This lead to a bunch of hydration errors - which doesn't have the best error message for this case neither. It probably should error with something that specifies that it's form state. This fixes it by teeing the stream into two streams and consuming it with two Flight clients. One to read the form state and one to emit side-effects and read the root. DiffTrain build for commit 6a44f35.
1 parent 32643b0 commit aaf4f7a

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25633,7 +25633,7 @@ if (__DEV__) {
2563325633
return root;
2563425634
}
2563525635

25636-
var ReactVersion = "18.3.0-canary-ef72271c2-20240216";
25636+
var ReactVersion = "18.3.0-canary-6a44f352e-20240216";
2563725637

2563825638
// Might add PROFILE later.
2563925639

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9179,7 +9179,7 @@ var devToolsConfig$jscomp$inline_1018 = {
91799179
throw Error("TestRenderer does not support findFiberByHostInstance()");
91809180
},
91819181
bundleType: 0,
9182-
version: "18.3.0-canary-ef72271c2-20240216",
9182+
version: "18.3.0-canary-6a44f352e-20240216",
91839183
rendererPackageName: "react-test-renderer"
91849184
};
91859185
var internals$jscomp$inline_1199 = {
@@ -9210,7 +9210,7 @@ var internals$jscomp$inline_1199 = {
92109210
scheduleRoot: null,
92119211
setRefreshHandler: null,
92129212
getCurrentFiber: null,
9213-
reconcilerVersion: "18.3.0-canary-ef72271c2-20240216"
9213+
reconcilerVersion: "18.3.0-canary-6a44f352e-20240216"
92149214
};
92159215
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
92169216
var hook$jscomp$inline_1200 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9607,7 +9607,7 @@ var devToolsConfig$jscomp$inline_1060 = {
96079607
throw Error("TestRenderer does not support findFiberByHostInstance()");
96089608
},
96099609
bundleType: 0,
9610-
version: "18.3.0-canary-ef72271c2-20240216",
9610+
version: "18.3.0-canary-6a44f352e-20240216",
96119611
rendererPackageName: "react-test-renderer"
96129612
};
96139613
var internals$jscomp$inline_1240 = {
@@ -9638,7 +9638,7 @@ var internals$jscomp$inline_1240 = {
96389638
scheduleRoot: null,
96399639
setRefreshHandler: null,
96409640
getCurrentFiber: null,
9641-
reconcilerVersion: "18.3.0-canary-ef72271c2-20240216"
9641+
reconcilerVersion: "18.3.0-canary-6a44f352e-20240216"
96429642
};
96439643
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96449644
var hook$jscomp$inline_1241 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-canary-ef72271c2-20240216";
27+
var ReactVersion = "18.3.0-canary-6a44f352e-20240216";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,4 +590,4 @@ exports.useSyncExternalStore = function (
590590
exports.useTransition = function () {
591591
return ReactCurrentDispatcher.current.useTransition();
592592
};
593-
exports.version = "18.3.0-canary-ef72271c2-20240216";
593+
exports.version = "18.3.0-canary-6a44f352e-20240216";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ exports.useSyncExternalStore = function (
586586
exports.useTransition = function () {
587587
return ReactCurrentDispatcher.current.useTransition();
588588
};
589-
exports.version = "18.3.0-canary-ef72271c2-20240216";
589+
exports.version = "18.3.0-canary-6a44f352e-20240216";
590590
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
591591
"function" ===
592592
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ef72271c2d1234c9d1e1358f8083021089a50faa
1+
6a44f352ecdfa93949cade1d2e74755e7d7e9aaa

0 commit comments

Comments
 (0)