Home / Function/ createLegacyRoot() — react Function Reference

createLegacyRoot() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c462be8a_77f6_3554_0ade_d607c5ec996d["createLegacyRoot()"]
  0b01b517_4763_de1a_12e5_d748facb25a6["createLegacyRoot.js"]
  c462be8a_77f6_3554_0ade_d607c5ec996d -->|defined in| 0b01b517_4763_de1a_12e5_d748facb25a6
  style c462be8a_77f6_3554_0ade_d607c5ec996d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/nesting/src/legacy/createLegacyRoot.js lines 29–43

export default function createLegacyRoot(container) {
  return {
    render(Component, props, context) {
      ReactDOM.render(
        <Bridge context={context}>
          <Component {...props} />
        </Bridge>,
        container
      );
    },
    unmount() {
      ReactDOM.unmountComponentAtNode(container);
    },
  };
}

Domain

Subdomains

Frequently Asked Questions

What does createLegacyRoot() do?
createLegacyRoot() is a function in the react codebase, defined in fixtures/nesting/src/legacy/createLegacyRoot.js.
Where is createLegacyRoot() defined?
createLegacyRoot() is defined in fixtures/nesting/src/legacy/createLegacyRoot.js at line 29.

Analyze Your Own Codebase

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

Try Supermodel Free