collectMinimalDependenciesInSubtree() — react Function Reference
Architecture documentation for the collectMinimalDependenciesInSubtree() function in DeriveMinimalDependenciesHIR.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 704d44a5_bab3_deab_2a77_1f49b45af20b["collectMinimalDependenciesInSubtree()"] 686094a4_f90a_6b2e_949a_aa03f03b5c66["DeriveMinimalDependenciesHIR.ts"] 704d44a5_bab3_deab_2a77_1f49b45af20b -->|defined in| 686094a4_f90a_6b2e_949a_aa03f03b5c66 3007052f_a4b8_b5ea_a419_9f2abc9f4286["deriveMinimalDependencies()"] 3007052f_a4b8_b5ea_a419_9f2abc9f4286 -->|calls| 704d44a5_bab3_deab_2a77_1f49b45af20b 6a38958d_320b_9a16_a7b1_b21a4633841c["isDependency()"] 704d44a5_bab3_deab_2a77_1f49b45af20b -->|calls| 6a38958d_320b_9a16_a7b1_b21a4633841c 313f0afe_6db1_bf05_f22c_502906b24f00["isOptional()"] 704d44a5_bab3_deab_2a77_1f49b45af20b -->|calls| 313f0afe_6db1_bf05_f22c_502906b24f00 style 704d44a5_bab3_deab_2a77_1f49b45af20b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts lines 318–344
function collectMinimalDependenciesInSubtree(
node: DependencyNode,
reactive: boolean,
rootIdentifier: Identifier,
path: Array<DependencyPathEntry>,
results: Set<ReactiveScopeDependency>,
): void {
if (isDependency(node.accessType)) {
results.add({identifier: rootIdentifier, reactive, path});
} else {
for (const [childName, childNode] of node.properties) {
collectMinimalDependenciesInSubtree(
childNode,
reactive,
rootIdentifier,
[
...path,
{
property: childName,
optional: isOptional(childNode.accessType),
},
],
results,
);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does collectMinimalDependenciesInSubtree() do?
collectMinimalDependenciesInSubtree() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts.
Where is collectMinimalDependenciesInSubtree() defined?
collectMinimalDependenciesInSubtree() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts at line 318.
What does collectMinimalDependenciesInSubtree() call?
collectMinimalDependenciesInSubtree() calls 2 function(s): isDependency, isOptional.
What calls collectMinimalDependenciesInSubtree()?
collectMinimalDependenciesInSubtree() is called by 1 function(s): deriveMinimalDependencies.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free