Skip to content

Commit 7216e1f

Browse files
committed
DevTools: fix backend activation (#26779)
## Summary We have a case: 1. Open components tab 2. Close Chrome / Firefox devtools window completely 3. Reopen browser devtools panel 4. Open components tab Currently, in version 4.27.6, we cannot load the components tree. This PR contains two changes: - non-functional refactoring in `react-devtools-shared/src/devtools/store.js`: removed some redundant type castings. - fixed backend manager logic (introduced in #26615) to activate already registered backends. Looks like frontend of devtools also depends on `renderer-attached` event, without it component tree won't load. ## How did you test this change? This fixes the case mentioned prior. Currently in 4.27.6 version it is not working, we need to refresh the page to make it work. I've tested this in several environments: chrome, firefox, standalone with RN application. DiffTrain build for commit 377c517.
1 parent 2ebe873 commit 7216e1f

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
@@ -23918,7 +23918,7 @@ function createFiberRoot(
2391823918
return root;
2391923919
}
2392023920

23921-
var ReactVersion = "18.3.0-canary-aef7ce554-20230503";
23921+
var ReactVersion = "18.3.0-canary-377c5175f-20230504";
2392223922

2392323923
// Might add PROFILE later.
2392423924

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
@@ -8623,7 +8623,7 @@ var devToolsConfig$jscomp$inline_1039 = {
86238623
throw Error("TestRenderer does not support findFiberByHostInstance()");
86248624
},
86258625
bundleType: 0,
8626-
version: "18.3.0-canary-aef7ce554-20230503",
8626+
version: "18.3.0-canary-377c5175f-20230504",
86278627
rendererPackageName: "react-test-renderer"
86288628
};
86298629
var internals$jscomp$inline_1238 = {
@@ -8654,7 +8654,7 @@ var internals$jscomp$inline_1238 = {
86548654
scheduleRoot: null,
86558655
setRefreshHandler: null,
86568656
getCurrentFiber: null,
8657-
reconcilerVersion: "18.3.0-canary-aef7ce554-20230503"
8657+
reconcilerVersion: "18.3.0-canary-377c5175f-20230504"
86588658
};
86598659
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
86608660
var hook$jscomp$inline_1239 = __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
@@ -9049,7 +9049,7 @@ var devToolsConfig$jscomp$inline_1081 = {
90499049
throw Error("TestRenderer does not support findFiberByHostInstance()");
90509050
},
90519051
bundleType: 0,
9052-
version: "18.3.0-canary-aef7ce554-20230503",
9052+
version: "18.3.0-canary-377c5175f-20230504",
90539053
rendererPackageName: "react-test-renderer"
90549054
};
90559055
var internals$jscomp$inline_1279 = {
@@ -9080,7 +9080,7 @@ var internals$jscomp$inline_1279 = {
90809080
scheduleRoot: null,
90819081
setRefreshHandler: null,
90829082
getCurrentFiber: null,
9083-
reconcilerVersion: "18.3.0-canary-aef7ce554-20230503"
9083+
reconcilerVersion: "18.3.0-canary-377c5175f-20230504"
90849084
};
90859085
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90869086
var hook$jscomp$inline_1280 = __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
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-aef7ce554-20230503";
30+
var ReactVersion = "18.3.0-canary-377c5175f-20230504";
3131

3232
// ATTENTION
3333
// 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
@@ -642,4 +642,4 @@ exports.useSyncExternalStore = function (
642642
);
643643
};
644644
exports.useTransition = useTransition;
645-
exports.version = "18.3.0-canary-aef7ce554-20230503";
645+
exports.version = "18.3.0-canary-377c5175f-20230504";

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
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
);
646646
};
647647
exports.useTransition = useTransition;
648-
exports.version = "18.3.0-canary-aef7ce554-20230503";
648+
exports.version = "18.3.0-canary-377c5175f-20230504";
649649

650650
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
651651
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aef7ce5547c9489dc48e31f69b002cd17206e0cb
1+
377c5175f78e47a3f01d323ad6528a696c88b76e

0 commit comments

Comments
 (0)