Home / Function/ isForwardRefCallback() — react Function Reference

isForwardRefCallback() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  570b7e73_2c19_4f41_d9ef_4540eb990f99["isForwardRefCallback()"]
  47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"]
  570b7e73_2c19_4f41_d9ef_4540eb990f99 -->|defined in| 47fb9f02_49dd_1d0d_5027_9353a6a77f1e
  e33d7f9c_2333_764f_8ca1_79868b065cbf["isInsideComponentOrHook()"]
  e33d7f9c_2333_764f_8ca1_79868b065cbf -->|calls| 570b7e73_2c19_4f41_d9ef_4540eb990f99
  be7612d8_31aa_c40a_35d5_89fd476ab28a["rule.create()"]
  be7612d8_31aa_c40a_35d5_89fd476ab28a -->|calls| 570b7e73_2c19_4f41_d9ef_4540eb990f99
  9eb81230_6bf0_4b3b_544b_2eb312b931aa["isReactFunction()"]
  570b7e73_2c19_4f41_d9ef_4540eb990f99 -->|calls| 9eb81230_6bf0_4b3b_544b_2eb312b931aa
  style 570b7e73_2c19_4f41_d9ef_4540eb990f99 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts lines 76–83

function isForwardRefCallback(node: Node): boolean {
  return !!(
    node.parent &&
    'callee' in node.parent &&
    node.parent.callee &&
    isReactFunction(node.parent.callee, 'forwardRef')
  );
}

Domain

Subdomains

Frequently Asked Questions

What does isForwardRefCallback() do?
isForwardRefCallback() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts.
Where is isForwardRefCallback() defined?
isForwardRefCallback() is defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts at line 76.
What does isForwardRefCallback() call?
isForwardRefCallback() calls 1 function(s): isReactFunction.
What calls isForwardRefCallback()?
isForwardRefCallback() is called by 2 function(s): isInsideComponentOrHook, rule.create.

Analyze Your Own Codebase

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

Try Supermodel Free