join-uncond-scopes-cond-deps.js — react Source File
Architecture documentation for join-uncond-scopes-cond-deps.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 66a6715a_1923_3880_78e9_e4f61456d2cd["join-uncond-scopes-cond-deps.js"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 66a6715a_1923_3880_78e9_e4f61456d2cd --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 66a6715a_1923_3880_78e9_e4f61456d2cd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enablePropagateDepsInHIR
// This tests an optimization, NOT a correctness property.
// When propagating reactive dependencies of an inner scope up to its parent,
// we prefer to retain granularity.
//
// In this test, we check that Forget propagates the inner scope's conditional
// dependencies (e.g. props.a.b) instead of only its derived minimal
// unconditional dependencies (e.g. props).
// ```javascript
// scope @0 (deps=[???] decls=[x, y]) {
// let y = {};
// scope @1 (deps=[props] decls=[x]) {
// let x = {};
// if (foo) mutate1(x, props.a.b);
// }
// mutate2(y, props.a.b);
// }
import {CONST_TRUE, setProperty} from 'shared-runtime';
function useJoinCondDepsInUncondScopes(props) {
let y = {};
let x = {};
if (CONST_TRUE) {
setProperty(x, props.a.b);
}
setProperty(y, props.a.b);
return [x, y];
}
export const FIXTURE_ENTRYPOINT = {
fn: useJoinCondDepsInUncondScopes,
params: [{a: {b: 3}}],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does join-uncond-scopes-cond-deps.js do?
join-uncond-scopes-cond-deps.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 join-uncond-scopes-cond-deps.js?
join-uncond-scopes-cond-deps.js defines 1 function(s): useJoinCondDepsInUncondScopes.
What does join-uncond-scopes-cond-deps.js depend on?
join-uncond-scopes-cond-deps.js imports 1 module(s): shared-runtime.
Where is join-uncond-scopes-cond-deps.js in the architecture?
join-uncond-scopes-cond-deps.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps/join-uncond-scopes-cond-deps.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/reduce-reactive-deps).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free