getFnLocalDeps() — react Function Reference
Architecture documentation for the getFnLocalDeps() function in ValidateNoDerivedComputationsInEffects_exp.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD ae2be195_25e4_6e95_cb7d_1d5b179b28ac["getFnLocalDeps()"] a38a9d1f_969c_8056_aa80_6cb5fedba226["ValidateNoDerivedComputationsInEffects_exp.ts"] ae2be195_25e4_6e95_cb7d_1d5b179b28ac -->|defined in| a38a9d1f_969c_8056_aa80_6cb5fedba226 8014ef2c_7e1b_b1da_b888_615d609f3c01["validateEffect()"] 8014ef2c_7e1b_b1da_b888_615d609f3c01 -->|calls| ae2be195_25e4_6e95_cb7d_1d5b179b28ac style ae2be195_25e4_6e95_cb7d_1d5b179b28ac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoDerivedComputationsInEffects_exp.ts lines 611–629
function getFnLocalDeps(
fn: FunctionExpression | undefined,
): Set<IdentifierId> | undefined {
if (!fn) {
return undefined;
}
const deps: Set<IdentifierId> = new Set();
for (const [, block] of fn.loweredFunc.func.body.blocks) {
for (const instr of block.instructions) {
if (instr.value.kind === 'LoadLocal') {
deps.add(instr.value.place.identifier.id);
}
}
}
return deps;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getFnLocalDeps() do?
getFnLocalDeps() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoDerivedComputationsInEffects_exp.ts.
Where is getFnLocalDeps() defined?
getFnLocalDeps() is defined in compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoDerivedComputationsInEffects_exp.ts at line 611.
What calls getFnLocalDeps()?
getFnLocalDeps() is called by 1 function(s): validateEffect.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free