todo-granular-iterator-semantics.js — react Source File
Architecture documentation for todo-granular-iterator-semantics.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 32c976db_f416_46c9_78ad_24695911c421["todo-granular-iterator-semantics.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 32c976db_f416_46c9_78ad_24695911c421 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 32c976db_f416_46c9_78ad_24695911c421 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {useIdentity, ValidateMemoization} from 'shared-runtime';
/**
* Fixture for granular iterator semantics:
* 1. ConditionallyMutate the iterator itself, depending on whether the iterator
* is a mutable iterator.
* 2. Capture effect on elements within the iterator.
*/
function Validate({x, input}) {
'use no memo';
return (
<>
<ValidateMemoization inputs={[]} output={x[0]} onlyCheckCompiled={true} />
<ValidateMemoization
inputs={[input]}
output={x[1]}
onlyCheckCompiled={true}
/>
</>
);
}
function useFoo(input) {
'use memo';
/**
* We should be able to memoize {} separately from `x`.
*/
const x = Array.from([{}]);
useIdentity();
x.push([input]);
return <Validate x={x} input={input} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: useFoo,
params: [1],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does todo-granular-iterator-semantics.js do?
todo-granular-iterator-semantics.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 todo-granular-iterator-semantics.js?
todo-granular-iterator-semantics.js defines 2 function(s): Validate, useFoo.
What does todo-granular-iterator-semantics.js depend on?
todo-granular-iterator-semantics.js imports 1 module(s): shared-runtime.
Where is todo-granular-iterator-semantics.js in the architecture?
todo-granular-iterator-semantics.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo-granular-iterator-semantics.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