useEffectEventError() — react Function Reference
Architecture documentation for the useEffectEventError() function in RulesOfHooks.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD f52d6abb_530b_a2c4_0acf_5eea9e6a3e2d["useEffectEventError()"] 47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"] f52d6abb_530b_a2c4_0acf_5eea9e6a3e2d -->|defined in| 47fb9f02_49dd_1d0d_5027_9353a6a77f1e be7612d8_31aa_c40a_35d5_89fd476ab28a["rule.create()"] be7612d8_31aa_c40a_35d5_89fd476ab28a -->|calls| f52d6abb_530b_a2c4_0acf_5eea9e6a3e2d style f52d6abb_530b_a2c4_0acf_5eea9e6a3e2d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts lines 174–188
function useEffectEventError(fn: string | null, called: boolean): string {
// no function identifier, i.e. it is not assigned to a variable
if (fn === null) {
return (
`React Hook "useEffectEvent" can only be called at the top level of your component.` +
` It cannot be passed down.`
);
}
return (
`\`${fn}\` is a function created with React Hook "useEffectEvent", and can only be called from ` +
'Effects and Effect Events in the same component.' +
(called ? '' : ' It cannot be assigned to a variable or passed down.')
);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does useEffectEventError() do?
useEffectEventError() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts.
Where is useEffectEventError() defined?
useEffectEventError() is defined in packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts at line 174.
What calls useEffectEventError()?
useEffectEventError() 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