getNodeWithoutReactNamespace() — react Function Reference
Architecture documentation for the getNodeWithoutReactNamespace() function in RulesOfHooks.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 121c2d64_9453_f5a6_afef_401576b4f76b["getNodeWithoutReactNamespace()"] 47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"] 121c2d64_9453_f5a6_afef_401576b4f76b -->|defined in| 47fb9f02_49dd_1d0d_5027_9353a6a77f1e be7612d8_31aa_c40a_35d5_89fd476ab28a["rule.create()"] be7612d8_31aa_c40a_35d5_89fd476ab28a -->|calls| 121c2d64_9453_f5a6_afef_401576b4f76b style 121c2d64_9453_f5a6_afef_401576b4f76b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts lines 136–149
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
Called By
Source
Frequently Asked Questions
What does getNodeWithoutReactNamespace() do?
getNodeWithoutReactNamespace() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts.
Where is getNodeWithoutReactNamespace() defined?
getNodeWithoutReactNamespace() is defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts at line 136.
What calls getNodeWithoutReactNamespace()?
getNodeWithoutReactNamespace() is called by 1 function(s): rule.create.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free