MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / deleteChild

Function deleteChild

code/composition/public/app.js:9051–9070  ·  view source on GitHub ↗
(returnFiber, childToDelete)

Source from the content-addressed store, hash-verified

9049// live outside of this function.
9050function ChildReconciler(shouldTrackSideEffects) {
9051 function deleteChild(returnFiber, childToDelete) {
9052 if (!shouldTrackSideEffects) {
9053 // Noop.
9054 return;
9055 }
9056 // Deletions are added in reversed order so we add it to the front.
9057 // At this point, the return fiber's effect list is empty except for
9058 // deletions, so we can just append the deletion to the list. The remaining
9059 // effects aren't added until the complete phase. Once we implement
9060 // resuming, this may not be true.
9061 var last = returnFiber.lastEffect;
9062 if (last !== null) {
9063 last.nextEffect = childToDelete;
9064 returnFiber.lastEffect = childToDelete;
9065 } else {
9066 returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
9067 }
9068 childToDelete.nextEffect = null;
9069 childToDelete.effectTag = Deletion;
9070 }
9071
9072 function deleteRemainingChildren(returnFiber, currentFirstChild) {
9073 if (!shouldTrackSideEffects) {

Callers 5

deleteRemainingChildrenFunction · 0.70
reconcileChildrenArrayFunction · 0.70
reconcileSingleElementFunction · 0.70
reconcileSinglePortalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected