Home / Function/ isReactFunction() — react Function Reference

isReactFunction() — react Function Reference

Architecture documentation for the isReactFunction() function in RulesOfHooks.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9eb81230_6bf0_4b3b_544b_2eb312b931aa["isReactFunction()"]
  47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"]
  9eb81230_6bf0_4b3b_544b_2eb312b931aa -->|defined in| 47fb9f02_49dd_1d0d_5027_9353a6a77f1e
  570b7e73_2c19_4f41_d9ef_4540eb990f99["isForwardRefCallback()"]
  570b7e73_2c19_4f41_d9ef_4540eb990f99 -->|calls| 9eb81230_6bf0_4b3b_544b_2eb312b931aa
  c846db86_f5e0_0014_473e_35406d2b6173["isMemoCallback()"]
  c846db86_f5e0_0014_473e_35406d2b6173 -->|calls| 9eb81230_6bf0_4b3b_544b_2eb312b931aa
  076803a2_9180_1797_745f_04e71e55caf2["isUseIdentifier()"]
  076803a2_9180_1797_745f_04e71e55caf2 -->|calls| 9eb81230_6bf0_4b3b_544b_2eb312b931aa
  style 9eb81230_6bf0_4b3b_544b_2eb312b931aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts lines 61–70

function isReactFunction(node: Node, functionName: string): boolean {
  return (
    ('name' in node && node.name === functionName) ||
    (node.type === 'MemberExpression' &&
      'name' in node.object &&
      node.object.name === 'React' &&
      'name' in node.property &&
      node.property.name === functionName)
  );
}

Domain

Subdomains

Frequently Asked Questions

What does isReactFunction() do?
isReactFunction() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts.
Where is isReactFunction() defined?
isReactFunction() is defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts at line 61.
What calls isReactFunction()?
isReactFunction() is called by 3 function(s): isForwardRefCallback, isMemoCallback, isUseIdentifier.

Analyze Your Own Codebase

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

Try Supermodel Free