Home / Function/ FunctionLocation() — react Function Reference

FunctionLocation() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9d4b5fcb_0fa4_91a8_411f_e7b3d1c644f9["FunctionLocation()"]
  8a53e3b1_7d98_d6cb_d776_c4171cd9ac5f["SidebarEventInfo.js"]
  9d4b5fcb_0fa4_91a8_411f_e7b3d1c644f9 -->|defined in| 8a53e3b1_7d98_d6cb_d776_c4171cd9ac5f
  style 9d4b5fcb_0fa4_91a8_411f_e7b3d1c644f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/Profiler/SidebarEventInfo.js lines 35–51

function FunctionLocation({location, displayName}: FunctionLocationProps) {
  // TODO: We should support symbolication here as well, but
  // symbolicating the whole stack can be expensive
  const [canViewSource, viewSource] = useOpenResource(location, null);
  return (
    <li>
      <Button
        className={
          canViewSource ? styles.ClickableSource : styles.UnclickableSource
        }
        disabled={!canViewSource}
        onClick={viewSource}>
        {displayName}
      </Button>
    </li>
  );
}

Domain

Subdomains

Frequently Asked Questions

What does FunctionLocation() do?
FunctionLocation() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Profiler/SidebarEventInfo.js.
Where is FunctionLocation() defined?
FunctionLocation() is defined in packages/react-devtools-shared/src/devtools/views/Profiler/SidebarEventInfo.js at line 35.

Analyze Your Own Codebase

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

Try Supermodel Free