allow-global-mutation-in-effect-indirect-usecallback.js — react Source File
Architecture documentation for allow-global-mutation-in-effect-indirect-usecallback.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c47247f6_846e_83c3_63ab_d45d5435f5ea["allow-global-mutation-in-effect-indirect-usecallback.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] c47247f6_846e_83c3_63ab_d45d5435f5ea --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style c47247f6_846e_83c3_63ab_d45d5435f5ea fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validatePreserveExistingMemoizationGuarantees
import {useCallback, useEffect, useState} from 'react';
let someGlobal = {};
function Component() {
const [state, setState] = useState(someGlobal);
const setGlobal = useCallback(() => {
someGlobal.value = true;
}, []);
useEffect(() => {
setGlobal();
}, []);
useEffect(() => {
setState(someGlobal.value);
}, [someGlobal]);
return <div>{String(state)}</div>;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};
Domain
Subdomains
Functions
Dependencies
- react
Source
Frequently Asked Questions
What does allow-global-mutation-in-effect-indirect-usecallback.js do?
allow-global-mutation-in-effect-indirect-usecallback.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 allow-global-mutation-in-effect-indirect-usecallback.js?
allow-global-mutation-in-effect-indirect-usecallback.js defines 1 function(s): Component.
What does allow-global-mutation-in-effect-indirect-usecallback.js depend on?
allow-global-mutation-in-effect-indirect-usecallback.js imports 1 module(s): react.
Where is allow-global-mutation-in-effect-indirect-usecallback.js in the architecture?
allow-global-mutation-in-effect-indirect-usecallback.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect-usecallback.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free