array-from-captures-arg0.js — react Source File
Architecture documentation for array-from-captures-arg0.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f6d58824_0e53_fe16_b8f3_077d9abc6939["array-from-captures-arg0.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] f6d58824_0e53_fe16_b8f3_077d9abc6939 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style f6d58824_0e53_fe16_b8f3_077d9abc6939 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {useIdentity, Stringify} from 'shared-runtime';
/**
* TODO: Note that this `Array.from` is inferred to be mutating its first
* argument. This is because React Compiler's typing system does not yet support
* annotating a function with a set of argument match cases + distinct
* definitions (polymorphism)
*
* In this case, we should be able to infer that the `Array.from` call is
* not mutating its 0th argument.
* The 0th argument should be typed as having `effect:Mutate` only when
* (1) it might be a mutable iterable or
* (2) the 1st argument might mutate its callee
*/
function Component({value}) {
const arr = [{value: 'foo'}, {value: 'bar'}, {value}];
useIdentity();
const derived = Array.from(arr);
return <Stringify>{derived.at(-1)}</Stringify>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{value: 5}],
sequentialRenders: [{value: 5}, {value: 6}, {value: 6}],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does array-from-captures-arg0.js do?
array-from-captures-arg0.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in array-from-captures-arg0.js?
array-from-captures-arg0.js defines 1 function(s): Component.
What does array-from-captures-arg0.js depend on?
array-from-captures-arg0.js imports 1 module(s): shared-runtime.
Where is array-from-captures-arg0.js in the architecture?
array-from-captures-arg0.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/array-from-captures-arg0.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free