forceUnmountCurrentAndReconcile() — react Function Reference
Architecture documentation for the forceUnmountCurrentAndReconcile() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD bef71511_dd51_a4d2_e857_595b11395fcd["forceUnmountCurrentAndReconcile()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] bef71511_dd51_a4d2_e857_595b11395fcd -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c fec6f182_8acb_a259_b114_e6d1db8ac64b["finishClassComponent()"] fec6f182_8acb_a259_b114_e6d1db8ac64b -->|calls| bef71511_dd51_a4d2_e857_595b11395fcd style bef71511_dd51_a4d2_e857_595b11395fcd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 373–403
function forceUnmountCurrentAndReconcile(
current: Fiber,
workInProgress: Fiber,
nextChildren: any,
renderLanes: Lanes,
) {
// This function is fork of reconcileChildren. It's used in cases where we
// want to reconcile without matching against the existing set. This has the
// effect of all current children being unmounted; even if the type and key
// are the same, the old child is unmounted and a new child is created.
//
// To do this, we're going to go through the reconcile algorithm twice. In
// the first pass, we schedule a deletion for all the current children by
// passing null.
workInProgress.child = reconcileChildFibers(
workInProgress,
current.child,
null,
renderLanes,
);
// In the second pass, we mount the new children. The trick here is that we
// pass null in place of where we usually pass the current child set. This has
// the effect of remounting all children regardless of whether their
// identities match.
workInProgress.child = reconcileChildFibers(
workInProgress,
null,
nextChildren,
renderLanes,
);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does forceUnmountCurrentAndReconcile() do?
forceUnmountCurrentAndReconcile() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is forceUnmountCurrentAndReconcile() defined?
forceUnmountCurrentAndReconcile() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 373.
What calls forceUnmountCurrentAndReconcile()?
forceUnmountCurrentAndReconcile() is called by 1 function(s): finishClassComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free