reactive-control-dependency-if.js — react Source File
Architecture documentation for reactive-control-dependency-if.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
function Component(props) {
let x;
if (props.cond) {
x = 1;
} else {
x = 2;
}
// The values assigned to `x` are non-reactive, but the value of `x`
// depends on the "control" value `props.cond` which is reactive.
// Therefore x should be treated as reactive too.
return [x];
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
sequentialRenders: [
{cond: true},
{cond: true},
{cond: false},
{cond: false},
{cond: true},
{cond: false},
{cond: true},
{cond: false},
],
};
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does reactive-control-dependency-if.js do?
reactive-control-dependency-if.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 reactive-control-dependency-if.js?
reactive-control-dependency-if.js defines 1 function(s): Component.
Where is reactive-control-dependency-if.js in the architecture?
reactive-control-dependency-if.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-control-dependency-if.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