Home / Function/ isHookName() — react Function Reference

isHookName() — react Function Reference

Architecture documentation for the isHookName() function in Imports.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d94198b4_0d10_05c9_4f74_b75616595f53["isHookName()"]
  1bba49a9_dc32_ad8e_e249_ee6b8eb56d16["ProgramContext"]
  d94198b4_0d10_05c9_4f74_b75616595f53 -->|defined in| 1bba49a9_dc32_ad8e_e249_ee6b8eb56d16
  be5dd024_ebb7_729f_f653_2158dc13ee4c["newUid()"]
  be5dd024_ebb7_729f_f653_2158dc13ee4c -->|calls| d94198b4_0d10_05c9_4f74_b75616595f53
  c32c4801_8f1e_6ab5_ff15_ac8ec7df6945["isHookName()"]
  d94198b4_0d10_05c9_4f74_b75616595f53 -->|calls| c32c4801_8f1e_6ab5_ff15_ac8ec7df6945
  style d94198b4_0d10_05c9_4f74_b75616595f53 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Imports.ts lines 110–119

  isHookName(name: string): boolean {
    if (this.opts.environment.hookPattern == null) {
      return isHookName(name);
    } else {
      const match = new RegExp(this.opts.environment.hookPattern).exec(name);
      return (
        match != null && typeof match[1] === 'string' && isHookName(match[1])
      );
    }
  }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does isHookName() do?
isHookName() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Imports.ts.
Where is isHookName() defined?
isHookName() is defined in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Imports.ts at line 110.
What does isHookName() call?
isHookName() calls 1 function(s): isHookName.
What calls isHookName()?
isHookName() is called by 1 function(s): newUid.

Analyze Your Own Codebase

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

Try Supermodel Free