getHookKindForType() — react Function Reference
Architecture documentation for the getHookKindForType() function in HIR.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 67f87937_36ed_a7a2_a22b_50ebabdcd7ed["getHookKindForType()"] 18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"] 67f87937_36ed_a7a2_a22b_50ebabdcd7ed -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec 17e4ff3c_e626_9c9b_1534_00488fccdf5c["getGlobalDeclaration()"] 17e4ff3c_e626_9c9b_1534_00488fccdf5c -->|calls| 67f87937_36ed_a7a2_a22b_50ebabdcd7ed 9cbd2355_05cd_5bbd_253f_7aeb4f947484["getHookKind()"] 9cbd2355_05cd_5bbd_253f_7aeb4f947484 -->|calls| 67f87937_36ed_a7a2_a22b_50ebabdcd7ed be656a93_989d_fb7a_b608_f2df48cb0e67["getFunctionSignature()"] 67f87937_36ed_a7a2_a22b_50ebabdcd7ed -->|calls| be656a93_989d_fb7a_b608_f2df48cb0e67 style 67f87937_36ed_a7a2_a22b_50ebabdcd7ed fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1988–1997
export function getHookKindForType(
env: Environment,
type: Type,
): HookKind | null {
if (type.kind === 'Function') {
const signature = env.getFunctionSignature(type);
return signature?.hookKind ?? null;
}
return null;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does getHookKindForType() do?
getHookKindForType() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is getHookKindForType() defined?
getHookKindForType() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1988.
What does getHookKindForType() call?
getHookKindForType() calls 1 function(s): getFunctionSignature.
What calls getHookKindForType()?
getHookKindForType() is called by 2 function(s): getGlobalDeclaration, getHookKind.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free