Home / Function/ init() — react Function Reference

init() — react Function Reference

Architecture documentation for the init() function in devtools.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  41513bd8_5858_eab1_3c7e_6309bbbfce09["init()"]
  8e1a3906_f1ab_7481_0743_a3aac6c9a119["devtools.js"]
  41513bd8_5858_eab1_3c7e_6309bbbfce09 -->|defined in| 8e1a3906_f1ab_7481_0743_a3aac6c9a119
  89cb75ee_2614_e9c0_40c3_92dae0d0e7fd["inject()"]
  41513bd8_5858_eab1_3c7e_6309bbbfce09 -->|calls| 89cb75ee_2614_e9c0_40c3_92dae0d0e7fd
  style 41513bd8_5858_eab1_3c7e_6309bbbfce09 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shell/src/e2e-regression/devtools.js lines 27–44

function init(appIframe, devtoolsContainer, appSource) {
  const {contentDocument, contentWindow} = appIframe;

  initializeBackend(contentWindow);

  const DevTools = createDevTools(contentWindow);

  inject(contentDocument, appSource, () => {
    ReactDOMClient.createRoot(devtoolsContainer).render(
      <DevTools
        hookNamesModuleLoaderFunction={hookNamesModuleLoaderFunction}
        showTabBar={true}
      />,
    );
  });

  activateBackend(contentWindow);
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does init() do?
init() is a function in the react codebase, defined in packages/react-devtools-shell/src/e2e-regression/devtools.js.
Where is init() defined?
init() is defined in packages/react-devtools-shell/src/e2e-regression/devtools.js at line 27.
What does init() call?
init() calls 1 function(s): inject.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free