derived-state-from-prop-local-state-and-component-scope.js — react Source File
Architecture documentation for derived-state-from-prop-local-state-and-component-scope.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 22310930_7e1f_1eec_9d5b_e0945bc73ec7["derived-state-from-prop-local-state-and-component-scope.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 22310930_7e1f_1eec_9d5b_e0945bc73ec7 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style 22310930_7e1f_1eec_9d5b_e0945bc73ec7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validateNoDerivedComputationsInEffects_exp @loggerTestOnly @outputMode:"lint"
import {useEffect, useState} from 'react';
function Component({firstName}) {
const [lastName, setLastName] = useState('Doe');
const [fullName, setFullName] = useState('John');
const middleName = 'D.';
useEffect(() => {
setFullName(firstName + ' ' + middleName + ' ' + lastName);
}, [firstName, middleName, lastName]);
return (
<div>
<input value={lastName} onChange={e => setLastName(e.target.value)} />
<div>{fullName}</div>
</div>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{firstName: 'John'}],
};
Domain
Subdomains
Functions
Dependencies
- react
Source
Frequently Asked Questions
What does derived-state-from-prop-local-state-and-component-scope.js do?
derived-state-from-prop-local-state-and-component-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 derived-state-from-prop-local-state-and-component-scope.js?
derived-state-from-prop-local-state-and-component-scope.js defines 1 function(s): Component.
What does derived-state-from-prop-local-state-and-component-scope.js depend on?
derived-state-from-prop-local-state-and-component-scope.js imports 1 module(s): react.
Where is derived-state-from-prop-local-state-and-component-scope.js in the architecture?
derived-state-from-prop-local-state-and-component-scope.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/effect-derived-computations/derived-state-from-prop-local-state-and-component-scope.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