From aaf258cf98f9cfef98941b6e53c120b1df3b1922 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 30 Jan 2020 09:22:40 -0800 Subject: [PATCH] Remove root.unmount() callback from DevTools code --- packages/react-devtools-extensions/src/main.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index fb920df93807e..0651734b5571a 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -355,11 +355,9 @@ function createPanelIfReactLoaded() { // It's easiest to recreate the DevTools panel (to clean up potential stale state). // We can revisit this in the future as a small optimization. - flushSync(() => { - root.unmount(() => { - initBridgeAndStore(); - }); - }); + flushSync(() => root.unmount()); + + initBridgeAndStore(); }); }, );