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