From 41c668c305e4e5cfe753ce24ef41304598529add Mon Sep 17 00:00:00 2001 From: "hoxyq (Meta Employee)" Date: Fri, 5 May 2023 16:36:15 -0700 Subject: [PATCH] DevTools: fix backend activation (#26779) Summary: ## 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 https://github.com/facebook/react/pull/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 https://github.com/facebook/react/commit/377c5175f78e47a3f01d323ad6528a696c88b76e. Changelog: [Internal] << DO NOT EDIT BELOW THIS LINE >> Reviewed By: sammy-SC Differential Revision: D45573294 Pulled By: tyao1 fbshipit-source-id: 42a8e4a54cd367080fdb7e1c357c48ae3564b7f0 --- packages/react-native/Libraries/Renderer/REVISION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Renderer/REVISION b/packages/react-native/Libraries/Renderer/REVISION index 9f9959d882f..0c8be4dd7ad 100644 --- a/packages/react-native/Libraries/Renderer/REVISION +++ b/packages/react-native/Libraries/Renderer/REVISION @@ -1 +1 @@ -aef7ce5547c9489dc48e31f69b002cd17206e0cb +377c5175f78e47a3f01d323ad6528a696c88b76e