App() — react Function Reference
Architecture documentation for the App() function in repro-mutate-new-set-of-frozen-items-in-callback.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 54ac4097_72b9_d504_766d_8b59c0f83885["App()"] e1693ca7_791d_a0d1_851e_454d55db6367["repro-mutate-new-set-of-frozen-items-in-callback.js"] 54ac4097_72b9_d504_766d_8b59c0f83885 -->|defined in| e1693ca7_791d_a0d1_851e_454d55db6367 style 54ac4097_72b9_d504_766d_8b59c0f83885 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/repro-mutate-new-set-of-frozen-items-in-callback.js lines 3–18
export const App = () => {
const [selected, setSelected] = useState(new Set<string>());
const onSelectedChange = (value: string) => {
const newSelected = new Set(selected);
if (newSelected.has(value)) {
// This should not count as a mutation of `selected`
newSelected.delete(value);
} else {
// This should not count as a mutation of `selected`
newSelected.add(value);
}
setSelected(newSelected);
};
return <Stringify selected={selected} onSelectedChange={onSelectedChange} />;
};
Domain
Subdomains
Source
Frequently Asked Questions
What does App() do?
App() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/repro-mutate-new-set-of-frozen-items-in-callback.js.
Where is App() defined?
App() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/repro-mutate-new-set-of-frozen-items-in-callback.js at line 3.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free