dont-merge-if-dep-is-inner-declaration-of-previous-scope.js — react Source File
Architecture documentation for dont-merge-if-dep-is-inner-declaration-of-previous-scope.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 75e2aa24_423e_d362_3683_b9214f34a1c3["dont-merge-if-dep-is-inner-declaration-of-previous-scope.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 75e2aa24_423e_d362_3683_b9214f34a1c3 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 75e2aa24_423e_d362_3683_b9214f34a1c3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {ValidateMemoization} from 'shared-runtime';
// Achieving Forget's level of memoization precision in this example isn't possible with useMemo
// without significantly altering the code, so disable the non-Forget evaluation of this fixture.
// @disableNonForgetInSprout
function Component({a, b, c}) {
const x = [];
let y;
if (a) {
y = [b];
}
x.push(c);
// this scope should not merge with the above scope because y does not invalidate
// on changes to `c`
const z = [y];
// return [x, z];
return (
<>
<ValidateMemoization inputs={[a, b, c]} output={x} />
<ValidateMemoization inputs={[a, b]} output={z} />
</>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{a: false, b: null, c: 0}],
sequentialRenders: [
{a: false, b: null, c: 0},
{a: false, b: null, c: 1},
{a: true, b: 0, c: 1},
{a: true, b: 1, c: 1},
],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does dont-merge-if-dep-is-inner-declaration-of-previous-scope.js do?
dont-merge-if-dep-is-inner-declaration-of-previous-scope.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 dont-merge-if-dep-is-inner-declaration-of-previous-scope.js?
dont-merge-if-dep-is-inner-declaration-of-previous-scope.js defines 1 function(s): Component.
What does dont-merge-if-dep-is-inner-declaration-of-previous-scope.js depend on?
dont-merge-if-dep-is-inner-declaration-of-previous-scope.js imports 1 module(s): shared-runtime.
Where is dont-merge-if-dep-is-inner-declaration-of-previous-scope.js in the architecture?
dont-merge-if-dep-is-inner-declaration-of-previous-scope.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/dont-merge-if-dep-is-inner-declaration-of-previous-scope.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