From d2ae77d0e41fc6cee22bf3f0c9bd9c3d8bcec58c Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 30 Jan 2020 09:36:43 -0800 Subject: [PATCH] Remove root.unmount() callback from DevTools code (#17939) --- 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 fb920df938..0651734b55 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(); }); }, );