Home / Function/ wrapWithHoc() — react Function Reference

wrapWithHoc() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  864d5710_2bfd_c5c2_8574_7acde48d931c["wrapWithHoc()"]
  0a2e02fb_c33f_5f1e_e182_fbc069244bcb["index.js"]
  864d5710_2bfd_c5c2_8574_7acde48d931c -->|defined in| 0a2e02fb_c33f_5f1e_e182_fbc069244bcb
  fa366999_631e_ff33_e304_074c31edd1f1["wrapWithNested()"]
  fa366999_631e_ff33_e304_074c31edd1f1 -->|calls| 864d5710_2bfd_c5c2_8574_7acde48d931c
  style 864d5710_2bfd_c5c2_8574_7acde48d931c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js lines 13–22

function wrapWithHoc(Component: () => any, index: number) {
  function HOC() {
    return <Component />;
  }

  const displayName = (Component: any).displayName || Component.name;

  HOC.displayName = `withHoc${index}(${displayName})`;
  return HOC;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does wrapWithHoc() do?
wrapWithHoc() is a function in the react codebase, defined in packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js.
Where is wrapWithHoc() defined?
wrapWithHoc() is defined in packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js at line 13.
What calls wrapWithHoc()?
wrapWithHoc() is called by 1 function(s): wrapWithNested.

Analyze Your Own Codebase

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

Try Supermodel Free