toggleEnabled() — react Function Reference
Architecture documentation for the toggleEnabled() function in index.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a5bf3ae2_91ae_c847_c3ff_24e5d6641d4d["toggleEnabled()"] c252378b_d680_96f7_afbe_5200374b78e8["index.js"] a5bf3ae2_91ae_c847_c3ff_24e5d6641d4d -->|defined in| c252378b_d680_96f7_afbe_5200374b78e8 style a5bf3ae2_91ae_c847_c3ff_24e5d6641d4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/backend/views/TraceUpdates/index.js lines 60–78
export function toggleEnabled(value: boolean): void {
isEnabled = value;
if (!isEnabled) {
nodeToData.clear();
if (drawAnimationFrameID !== null) {
cancelAnimationFrame(drawAnimationFrameID);
drawAnimationFrameID = null;
}
if (redrawTimeoutID !== null) {
clearTimeout(redrawTimeoutID);
redrawTimeoutID = null;
}
destroyCanvas(agent);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does toggleEnabled() do?
toggleEnabled() is a function in the react codebase, defined in packages/react-devtools-shared/src/backend/views/TraceUpdates/index.js.
Where is toggleEnabled() defined?
toggleEnabled() is defined in packages/react-devtools-shared/src/backend/views/TraceUpdates/index.js at line 60.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free