batchedUpdates() — react Function Reference
Architecture documentation for the batchedUpdates() function in ReactDOMUpdateBatching.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f9e9db51_d79e_2bec_6b9a_825840efe3e5["batchedUpdates()"] 0d9ca2c0_8ba8_d861_ef7c_cea0ecdd2aa3["ReactDOMUpdateBatching.js"] f9e9db51_d79e_2bec_6b9a_825840efe3e5 -->|defined in| 0d9ca2c0_8ba8_d861_ef7c_cea0ecdd2aa3 1be3a0b7_80ec_6d97_2d85_4a67f64ff80b["dispatchEventForPluginEventSystem()"] 1be3a0b7_80ec_6d97_2d85_4a67f64ff80b -->|calls| f9e9db51_d79e_2bec_6b9a_825840efe3e5 60cc0b14_230e_8620_371d_9991d32e12c7["manualDispatchChangeEvent()"] 60cc0b14_230e_8620_371d_9991d32e12c7 -->|calls| f9e9db51_d79e_2bec_6b9a_825840efe3e5 8f15f580_96e9_b161_b714_742b0ed77fe8["manualDispatchScrollEndEvent()"] 8f15f580_96e9_b161_b714_742b0ed77fe8 -->|calls| f9e9db51_d79e_2bec_6b9a_825840efe3e5 bbab8714_5482_7756_d9d1_07b4655458f7["finishEventHandler()"] f9e9db51_d79e_2bec_6b9a_825840efe3e5 -->|calls| bbab8714_5482_7756_d9d1_07b4655458f7 style f9e9db51_d79e_2bec_6b9a_825840efe3e5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/events/ReactDOMUpdateBatching.js lines 46–59
export function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) {
// If we are currently inside another batch, we need to wait until it
// fully completes before restoring state.
return fn(a, b);
}
isInsideEventHandler = true;
try {
return batchedUpdatesImpl(fn, a, b);
} finally {
isInsideEventHandler = false;
finishEventHandler();
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does batchedUpdates() do?
batchedUpdates() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/ReactDOMUpdateBatching.js.
Where is batchedUpdates() defined?
batchedUpdates() is defined in packages/react-dom-bindings/src/events/ReactDOMUpdateBatching.js at line 46.
What does batchedUpdates() call?
batchedUpdates() calls 1 function(s): finishEventHandler.
What calls batchedUpdates()?
batchedUpdates() is called by 3 function(s): dispatchEventForPluginEventSystem, manualDispatchChangeEvent, manualDispatchScrollEndEvent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free