repro-invalid-phi-as-dependency.tsx — react Source File
Architecture documentation for repro-invalid-phi-as-dependency.tsx, a tsx file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 54ade03f_9a21_874f_a213_bcc333e56cbf["repro-invalid-phi-as-dependency.tsx"] 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 54ade03f_9a21_874f_a213_bcc333e56cbf --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 54ade03f_9a21_874f_a213_bcc333e56cbf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enableNewMutationAliasingModel
import {CONST_TRUE, Stringify, mutate, useIdentity} from 'shared-runtime';
/**
* Fixture showing an edge case for ReactiveScope variable propagation.
* Fixed in the new inference model
*
* Found differences in evaluator results
* Non-forget (expected):
* <div>{"obj":{"inner":{"value":"hello"},"wat0":"joe"},"inner":["[[ cyclic ref *2 ]]"]}</div>
* <div>{"obj":{"inner":{"value":"hello"},"wat0":"joe"},"inner":["[[ cyclic ref *2 ]]"]}</div>
* Forget:
* <div>{"obj":{"inner":{"value":"hello"},"wat0":"joe"},"inner":["[[ cyclic ref *2 ]]"]}</div>
* [[ (exception in render) Error: invariant broken ]]
*
*/
function Component() {
const obj = CONST_TRUE ? {inner: {value: 'hello'}} : null;
const boxedInner = [obj?.inner];
useIdentity(null);
mutate(obj);
if (boxedInner[0] !== obj?.inner) {
throw new Error('invariant broken');
}
return <Stringify obj={obj} inner={boxedInner} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{arg: 0}],
sequentialRenders: [{arg: 0}, {arg: 1}],
};
Domain
Subdomains
Functions
Dependencies
- shared-runtime
Source
Frequently Asked Questions
What does repro-invalid-phi-as-dependency.tsx do?
repro-invalid-phi-as-dependency.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in repro-invalid-phi-as-dependency.tsx?
repro-invalid-phi-as-dependency.tsx defines 1 function(s): Component.
What does repro-invalid-phi-as-dependency.tsx depend on?
repro-invalid-phi-as-dependency.tsx imports 1 module(s): shared-runtime.
Where is repro-invalid-phi-as-dependency.tsx in the architecture?
repro-invalid-phi-as-dependency.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-invalid-phi-as-dependency.tsx (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