Home / Function/ hookNameFor() — react Function Reference

hookNameFor() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  53395c34_7472_4850_0d26_5722d5c6d970["hookNameFor()"]
  c91679b7_c93e_6e95_410e_81e24076c30a["SourceMapMetadataConsumer"]
  53395c34_7472_4850_0d26_5722d5c6d970 -->|defined in| c91679b7_c93e_6e95_410e_81e24076c30a
  8fcd4639_43fc_b147_7c26_e198696286ab["findHookNames()"]
  8fcd4639_43fc_b147_7c26_e198696286ab -->|calls| 53395c34_7472_4850_0d26_5722d5c6d970
  8363e8e9_bb7f_f116_6160_65e0851ee4a9["_getHookMapForSource()"]
  53395c34_7472_4850_0d26_5722d5c6d970 -->|calls| 8363e8e9_bb7f_f116_6160_65e0851ee4a9
  e39d8e56_d264_6a32_839e_aeea5b5a0b9b["getHookNameForLocation()"]
  53395c34_7472_4850_0d26_5722d5c6d970 -->|calls| e39d8e56_d264_6a32_839e_aeea5b5a0b9b
  style 53395c34_7472_4850_0d26_5722d5c6d970 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/hooks/SourceMapMetadataConsumer.js lines 82–100

  hookNameFor({
    line,
    column,
    source,
  }: {
    ...Position,
    +source: ?string,
  }): ?string {
    if (source == null) {
      return null;
    }

    const hookMap = this._getHookMapForSource(source);
    if (hookMap == null) {
      return null;
    }

    return getHookNameForLocation({line, column}, hookMap);
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does hookNameFor() do?
hookNameFor() is a function in the react codebase, defined in packages/react-devtools-shared/src/hooks/SourceMapMetadataConsumer.js.
Where is hookNameFor() defined?
hookNameFor() is defined in packages/react-devtools-shared/src/hooks/SourceMapMetadataConsumer.js at line 82.
What does hookNameFor() call?
hookNameFor() calls 2 function(s): _getHookMapForSource, getHookNameForLocation.
What calls hookNameFor()?
hookNameFor() is called by 1 function(s): findHookNames.

Analyze Your Own Codebase

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

Try Supermodel Free