assign() — react Function Reference
Architecture documentation for the assign() function in InferMutationAliasingRanges.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD fd717f31_7e4c_313d_1581_4e6a2ea3ca85["assign()"] 78bdc9d3_b80e_c93f_98e8_83b50c1b2b77["AliasingState"] fd717f31_7e4c_313d_1581_4e6a2ea3ca85 -->|defined in| 78bdc9d3_b80e_c93f_98e8_83b50c1b2b77 f3815d1a_36a1_3e3d_92f2_dbbe88f01fe3["inferMutationAliasingRanges()"] f3815d1a_36a1_3e3d_92f2_dbbe88f01fe3 -->|calls| fd717f31_7e4c_313d_1581_4e6a2ea3ca85 style fd717f31_7e4c_313d_1581_4e6a2ea3ca85 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts lines 639–649
assign(index: number, from: Place, into: Place): void {
const fromNode = this.nodes.get(from.identifier);
const toNode = this.nodes.get(into.identifier);
if (fromNode == null || toNode == null) {
return;
}
fromNode.edges.push({index, node: into.identifier, kind: 'alias'});
if (!toNode.aliases.has(from.identifier)) {
toNode.aliases.set(from.identifier, index);
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does assign() do?
assign() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts.
Where is assign() defined?
assign() is defined in compiler/packages/babel-plugin-react-compiler/src/Inference/InferMutationAliasingRanges.ts at line 639.
What calls assign()?
assign() is called by 1 function(s): inferMutationAliasingRanges.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free