ref-conditional-in-effect-no-error.js — react Source File
Architecture documentation for ref-conditional-in-effect-no-error.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ce745582_9a77_deb3_708e_fa7edcf8140c["ref-conditional-in-effect-no-error.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] ce745582_9a77_deb3_708e_fa7edcf8140c --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style ce745582_9a77_deb3_708e_fa7edcf8140c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validateNoDerivedComputationsInEffects_exp @loggerTestOnly @outputMode:"lint"
import {useEffect, useState, useRef} from 'react';
export default function Component({test}) {
const [local, setLocal] = useState(0);
const myRef = useRef(null);
useEffect(() => {
if (myRef.current) {
setLocal(test);
} else {
setLocal(test + test);
}
}, [test]);
return <>{local}</>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{test: 4}],
};
Domain
Subdomains
Functions
Dependencies
- react
Source
Frequently Asked Questions
What does ref-conditional-in-effect-no-error.js do?
ref-conditional-in-effect-no-error.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 ref-conditional-in-effect-no-error.js?
ref-conditional-in-effect-no-error.js defines 1 function(s): Component.
What does ref-conditional-in-effect-no-error.js depend on?
ref-conditional-in-effect-no-error.js imports 1 module(s): react.
Where is ref-conditional-in-effect-no-error.js in the architecture?
ref-conditional-in-effect-no-error.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/effect-derived-computations/ref-conditional-in-effect-no-error.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/effect-derived-computations).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free