isEffectIdentifier() — react Function Reference
Architecture documentation for the isEffectIdentifier() function in RulesOfHooks.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD cd5349a1_5ccf_8999_57f6_d55c5c6225ae["isEffectIdentifier()"] 47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"] cd5349a1_5ccf_8999_57f6_d55c5c6225ae -->|defined in| 47fb9f02_49dd_1d0d_5027_9353a6a77f1e be7612d8_31aa_c40a_35d5_89fd476ab28a["rule.create()"] be7612d8_31aa_c40a_35d5_89fd476ab28a -->|calls| cd5349a1_5ccf_8999_57f6_d55c5c6225ae style cd5349a1_5ccf_8999_57f6_d55c5c6225ae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts lines 151–168
function isEffectIdentifier(node: Node, additionalHooks?: RegExp): boolean {
const isBuiltInEffect =
node.type === 'Identifier' &&
(node.name === 'useEffect' ||
node.name === 'useLayoutEffect' ||
node.name === 'useInsertionEffect');
if (isBuiltInEffect) {
return true;
}
// Check if this matches additional hooks configured by the user
if (additionalHooks && node.type === 'Identifier') {
return additionalHooks.test(node.name);
}
return false;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does isEffectIdentifier() do?
isEffectIdentifier() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts.
Where is isEffectIdentifier() defined?
isEffectIdentifier() is defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts at line 151.
What calls isEffectIdentifier()?
isEffectIdentifier() 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