mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Flight] Serialize deduped elements by direct reference even if they suspend (#28283)
In #28123 I switched these to be lazy references. However that creates a lazy wrapper even if they're synchronously available. We try to as much as possible preserve the original data structure in these cases. E.g. here in the dev outlining I only use a lazy wrapper if it didn't complete synchronously: https://github.com/facebook/react/pull/28272/files#diff-d4c9c509922b3671d3ecce4e051df66dd5c3d38ff913c7a7fe94abc3ba2ed72eR638 Unfortunately we don't have a data structure that tracks the status of each emitted row. We could store the task in the map but then they couldn't be GC:ed as they complete. We could maybe store the status of each element but seems so heavy. For now I just went back to direct reference which might be an issue since it can suspend something higher up when deduped. DiffTrain build for commit https://github.com/facebook/react/commit/ba5e6a8329c7194a2c573c037a37f24ce45ee58f.
This commit is contained in:
+1
-1
@@ -25670,7 +25670,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-e41ee9ea7-20240208";
|
||||
var ReactVersion = "18.3.0-canary-ba5e6a832-20240208";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+2
-2
@@ -9152,7 +9152,7 @@ var devToolsConfig$jscomp$inline_1011 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-e41ee9ea7-20240208",
|
||||
version: "18.3.0-canary-ba5e6a832-20240208",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1189 = {
|
||||
@@ -9183,7 +9183,7 @@ var internals$jscomp$inline_1189 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-e41ee9ea7-20240208"
|
||||
reconcilerVersion: "18.3.0-canary-ba5e6a832-20240208"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1190 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+2
-2
@@ -9580,7 +9580,7 @@ var devToolsConfig$jscomp$inline_1053 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-e41ee9ea7-20240208",
|
||||
version: "18.3.0-canary-ba5e6a832-20240208",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1230 = {
|
||||
@@ -9611,7 +9611,7 @@ var internals$jscomp$inline_1230 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-e41ee9ea7-20240208"
|
||||
reconcilerVersion: "18.3.0-canary-ba5e6a832-20240208"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1231 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-canary-e41ee9ea7-20240208";
|
||||
var ReactVersion = "18.3.0-canary-ba5e6a832-20240208";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -551,4 +551,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-e41ee9ea7-20240208";
|
||||
exports.version = "18.3.0-canary-ba5e6a832-20240208";
|
||||
|
||||
+1
-1
@@ -547,7 +547,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-e41ee9ea7-20240208";
|
||||
exports.version = "18.3.0-canary-ba5e6a832-20240208";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
e41ee9ea70f8998144fdd959ac11fd7a40e4ee20
|
||||
ba5e6a8329c7194a2c573c037a37f24ce45ee58f
|
||||
|
||||
Reference in New Issue
Block a user