File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
packages/react-devtools-shell/src Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,17 @@ const {contentDocument, contentWindow} = iframe;
1717// Helps with positioning Overlay UI.
1818contentWindow . __REACT_DEVTOOLS_TARGET_WINDOW__ = window ;
1919
20+ // Initialize the backend and frontend early so that we have the messages that we
21+ // need during initial render
2022initializeBackend ( contentWindow ) ;
2123
24+ // Activate the backend only once the DevTools frontend Store has been initialized.
25+ // Otherwise the Store may miss important initial tree op codes.
26+ // activateBackend(contentWindow);
27+ const DevTools = initializeFrontend ( contentWindow ) ;
28+
29+ activateBackend ( contentWindow ) ;
30+
2231const container = ( ( document . getElementById ( 'devtools' ) : any ) : HTMLElement ) ;
2332
2433let isTestAppMounted = true ;
@@ -45,12 +54,6 @@ mountButton.addEventListener('click', function() {
4554inject ( 'dist/app.js' , ( ) => {
4655 initDevTools ( {
4756 connect ( cb ) {
48- const DevTools = initializeFrontend ( contentWindow ) ;
49-
50- // Activate the backend only once the DevTools frontend Store has been initialized.
51- // Otherwise the Store may miss important initial tree op codes.
52- activateBackend ( contentWindow ) ;
53-
5457 const root = createRoot ( container ) ;
5558 root . render (
5659 createElement ( DevTools , {
You can’t perform that action at this time.
0 commit comments