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
  c7cef9d6_a084_3c3b_f389_5140e937f1eb["init()"]
  d29b9def_f527_5cd3_81f2_47f19e0fe569["devtools.js"]
  c7cef9d6_a084_3c3b_f389_5140e937f1eb -->|defined in| d29b9def_f527_5cd3_81f2_47f19e0fe569
  3aff0de3_4afc_3cbb_aa8c_455e9a83489c["inject()"]
  c7cef9d6_a084_3c3b_f389_5140e937f1eb -->|calls| 3aff0de3_4afc_3cbb_aa8c_455e9a83489c
  style c7cef9d6_a084_3c3b_f389_5140e937f1eb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shell/src/e2e/devtools.js lines 35–52

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/devtools.js.
Where is init() defined?
init() is defined in packages/react-devtools-shell/src/e2e/devtools.js at line 35.
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