Remove root.unmount() callback from DevTools code (#17939)
Brian Vaughn committed
Jan 30, 2020 at 09:36 UTC
d2ae77d0e41fc6cee22bf3f0c9bd9c3d8bcec58c
1 file changed
+3
-5
packages/react-devtools-extensions/src/main.js
+3
-5
@@ -355,11 +355,9 @@ function createPanelIfReactLoaded() {
355
356
// It's easiest to recreate the DevTools panel (to clean up potential stale state).
357
// We can revisit this in the future as a small optimization.
358
- flushSync(() => {
359
- root.unmount(() => {
360
- initBridgeAndStore();
361
- });
362
- });
358
+ flushSync(() => root.unmount());
359
+
360
+ initBridgeAndStore();
361
});
362
},
363
);