MCPcopy
hub / github.com/facebook/react / init

Function init

packages/react-devtools-shell/src/e2e/devtools.js:35–52  ·  packages/react-devtools-shell/src/e2e/devtools.js::init
(appIframe, devtoolsContainer, appSource)

Source from the content-addressed store, hash-verified

33}
34
35function init(appIframe, devtoolsContainer, appSource) {
36 const {contentDocument, contentWindow} = appIframe;
37
38 initializeBackend(contentWindow);
39
40 const DevTools = createDevTools(contentWindow);
41
42 inject(contentDocument, appSource, () => {
43 ReactDOMClient.createRoot(devtoolsContainer).render(
44 <DevTools
45 hookNamesModuleLoaderFunction={hookNamesModuleLoaderFunction}
46 showTabBar={true}
47 />,
48 );
49 });
50
51 activateBackend(contentWindow);
52}
53
54const iframe = document.getElementById(class="st">'iframe');
55const devtoolsContainer = document.getElementById(class="st">'devtools');

Callers 14

devtools.jsFile · 0.70
mapIntoArrayFunction · 0.50
useReducerFunction · 0.50
resolveToJSONFunction · 0.50
devtools.jsFile · 0.50
describeElementTypeFunction · 0.50
getComponentNameFromTypeFunction · 0.50
resolveLazyFunction · 0.50
initFbtFunction · 0.50
getComponentNameFunction · 0.50

Calls 3

activateBackendFunction · 0.85
injectFunction · 0.70
renderMethod · 0.65

Tested by

no test coverage detected