setCurrent() — react Function Reference
Architecture documentation for the setCurrent() function in index.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD db3e33e1_21b7_d6bd_c6f4_9aa335a423ab["setCurrent()"] e7e94027_87c5_661b_dd97_be583c709eb3["index.ts"] db3e33e1_21b7_d6bd_c6f4_9aa335a423ab -->|defined in| e7e94027_87c5_661b_dd97_be583c709eb3 89475c27_36e1_b642_e8a4_3f8ac66c9bff["$dispatcherGuard()"] 89475c27_36e1_b642_e8a4_3f8ac66c9bff -->|calls| db3e33e1_21b7_d6bd_c6f4_9aa335a423ab style db3e33e1_21b7_d6bd_c6f4_9aa335a423ab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/react-compiler-runtime/src/index.ts lines 94–97
function setCurrent(newDispatcher: any) {
ReactSecretInternals.ReactCurrentDispatcher.current = newDispatcher;
return ReactSecretInternals.ReactCurrentDispatcher.current;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setCurrent() do?
setCurrent() is a function in the react codebase, defined in compiler/packages/react-compiler-runtime/src/index.ts.
Where is setCurrent() defined?
setCurrent() is defined in compiler/packages/react-compiler-runtime/src/index.ts at line 94.
What calls setCurrent()?
setCurrent() is called by 1 function(s): $dispatcherGuard.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free