Home / Function/ getNodeWithoutReactNamespace() — react Function Reference

getNodeWithoutReactNamespace() — react Function Reference

Architecture documentation for the getNodeWithoutReactNamespace() function in ExhaustiveDeps.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  57d4575e_cb38_7d65_a871_8e1ae5d76a1f["getNodeWithoutReactNamespace()"]
  ea02b01a_dd46_4b35_fe00_775aec496668["ExhaustiveDeps.ts"]
  57d4575e_cb38_7d65_a871_8e1ae5d76a1f -->|defined in| ea02b01a_dd46_4b35_fe00_775aec496668
  895f966f_4edb_0ba3_8a49_6adf99e31ec1["getReactiveHookCallbackIndex()"]
  895f966f_4edb_0ba3_8a49_6adf99e31ec1 -->|calls| 57d4575e_cb38_7d65_a871_8e1ae5d76a1f
  c0937ffe_5980_6959_3af6_e18a4a23114f["rule.create()"]
  c0937ffe_5980_6959_3af6_e18a4a23114f -->|calls| 57d4575e_cb38_7d65_a871_8e1ae5d76a1f
  style 57d4575e_cb38_7d65_a871_8e1ae5d76a1f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts lines 1970–1983

function getNodeWithoutReactNamespace(
  node: Expression | Super,
): Expression | Identifier | Super {
  if (
    node.type === 'MemberExpression' &&
    node.object.type === 'Identifier' &&
    node.object.name === 'React' &&
    node.property.type === 'Identifier' &&
    !node.computed
  ) {
    return node.property;
  }
  return node;
}

Domain

Subdomains

Frequently Asked Questions

What does getNodeWithoutReactNamespace() do?
getNodeWithoutReactNamespace() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts.
Where is getNodeWithoutReactNamespace() defined?
getNodeWithoutReactNamespace() is defined in packages/eslint-plugin-react-hooks/src/rules/ExhaustiveDeps.ts at line 1970.
What calls getNodeWithoutReactNamespace()?
getNodeWithoutReactNamespace() is called by 2 function(s): getReactiveHookCallbackIndex, rule.create.

Analyze Your Own Codebase

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

Try Supermodel Free