Skip to content

Commit d2ae77d

Browse files
author
Brian Vaughn
authored
Remove root.unmount() callback from DevTools code (#17939)
1 parent e98797f commit d2ae77d

File tree

1 file changed

+3
-5
lines changed
  • packages/react-devtools-extensions/src

1 file changed

+3
-5
lines changed

packages/react-devtools-extensions/src/main.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,9 @@ function createPanelIfReactLoaded() {
355355

356356
// It's easiest to recreate the DevTools panel (to clean up potential stale state).
357357
// 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();
363361
});
364362
},
365363
);

0 commit comments

Comments
 (0)