mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fix[devtools]: check if fiber is unmounted before trying to highlight (#26983)
For React Native environment, we sometimes spam the console with warnings `"Could not find Fiber with id ..."`. This is an attempt to fix this or at least reduce the amount of such potential warnings being thrown. Now checking if fiber is already unnmounted before trying to get native nodes for fiber. This might happen if you try to inspect an element in DevTools, but at the time when event has been received, the element was already unmounted. DiffTrain build for commit https://github.com/facebook/react/commit/794b770dbd6be48d42438ea76911d32c37c7dd6e.
This commit is contained in:
+1
-1
@@ -23934,7 +23934,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-254cbdbd6-20230621";
|
||||
var ReactVersion = "18.3.0-canary-794b770db-20230622";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+2
-2
@@ -8617,7 +8617,7 @@ var devToolsConfig$jscomp$inline_1031 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-254cbdbd6-20230621",
|
||||
version: "18.3.0-canary-794b770db-20230622",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1230 = {
|
||||
@@ -8648,7 +8648,7 @@ var internals$jscomp$inline_1230 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-254cbdbd6-20230621"
|
||||
reconcilerVersion: "18.3.0-canary-794b770db-20230622"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1231 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+2
-2
@@ -9043,7 +9043,7 @@ var devToolsConfig$jscomp$inline_1073 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-254cbdbd6-20230621",
|
||||
version: "18.3.0-canary-794b770db-20230622",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1271 = {
|
||||
@@ -9074,7 +9074,7 @@ var internals$jscomp$inline_1271 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-254cbdbd6-20230621"
|
||||
reconcilerVersion: "18.3.0-canary-794b770db-20230622"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1272 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-canary-254cbdbd6-20230621";
|
||||
var ReactVersion = "18.3.0-canary-794b770db-20230622";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -642,4 +642,4 @@ exports.useSyncExternalStore = function (
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-canary-254cbdbd6-20230621";
|
||||
exports.version = "18.3.0-canary-794b770db-20230622";
|
||||
|
||||
+1
-1
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-canary-254cbdbd6-20230621";
|
||||
exports.version = "18.3.0-canary-794b770db-20230622";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
254cbdbd6d851a30bf3b649a6cb7c52786766fa4
|
||||
794b770dbd6be48d42438ea76911d32c37c7dd6e
|
||||
|
||||
Reference in New Issue
Block a user