ListAppLegacy.js — react Source File
Architecture documentation for ListAppLegacy.js, a javascript file in the react codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR afbe0e94_9107_c22a_44d8_dc43ee591bc4["ListAppLegacy.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] afbe0e94_9107_c22a_44d8_dc43ee591bc4 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 d0eeac21_8285_7c0f_29f9_523d1b9b57a1["app-legacy.js"] d0eeac21_8285_7c0f_29f9_523d1b9b57a1 --> afbe0e94_9107_c22a_44d8_dc43ee591bc4 style afbe0e94_9107_c22a_44d8_dc43ee591bc4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import * as React from 'react';
export default function App(): React.Node {
return <List />;
}
class List extends React.Component {
constructor(props: any) {
super(props);
this.state = {
items: ['one', 'two', 'three'],
};
}
addItem = () => {
if (this.inputRef && this.inputRef.value) {
this.setState({items: [...this.state.items, this.inputRef.value]});
this.inputRef.value = '';
}
};
render(): any {
return (
<div>
<input
data-testname="AddItemInput"
value={this.state.text}
onChange={this.onInputChange}
ref={c => (this.inputRef = c)}
/>
<button data-testname="AddItemButton" onClick={this.addItem}>
Add Item
</button>
<ul data-testname="List">
{this.state.items.map((label, index) => (
<ListItem key={index} label={label} />
))}
</ul>
</div>
);
}
}
// $FlowFixMe[missing-local-annot]
function ListItem({label}) {
return <li data-testname="ListItem">{label}</li>;
}
Domain
Subdomains
Functions
Classes
Dependencies
- react
Source
Frequently Asked Questions
What does ListAppLegacy.js do?
ListAppLegacy.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ListAppLegacy.js?
ListAppLegacy.js defines 2 function(s): App, ListItem.
What does ListAppLegacy.js depend on?
ListAppLegacy.js imports 1 module(s): react.
What files import ListAppLegacy.js?
ListAppLegacy.js is imported by 1 file(s): app-legacy.js.
Where is ListAppLegacy.js in the architecture?
ListAppLegacy.js is located at packages/react-devtools-shell/src/e2e-apps/ListAppLegacy.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shell/src/e2e-apps).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free