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;
17
17
// Helps with positioning Overlay UI.
18
18
contentWindow . __REACT_DEVTOOLS_TARGET_WINDOW__ = window ;
19
19
20
+ // Initialize the backend and frontend early so that we have the messages that we
21
+ // need during initial render
20
22
initializeBackend ( contentWindow ) ;
21
23
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
+
22
31
const container = ( ( document . getElementById ( 'devtools' ) : any ) : HTMLElement ) ;
23
32
24
33
let isTestAppMounted = true ;
@@ -45,12 +54,6 @@ mountButton.addEventListener('click', function() {
45
54
inject ( 'dist/app.js' , ( ) => {
46
55
initDevTools ( {
47
56
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
-
54
57
const root = createRoot ( container ) ;
55
58
root . render (
56
59
createElement ( DevTools , {
You can’t perform that action at this time.
0 commit comments