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

Function deleteChild

code/third-party/public/app.js:8146–8165  ·  view source on GitHub ↗
(returnFiber, childToDelete)

Source from the content-addressed store, hash-verified

8144// live outside of this function.
8145function ChildReconciler(shouldTrackSideEffects) {
8146 function deleteChild(returnFiber, childToDelete) {
8147 if (!shouldTrackSideEffects) {
8148 // Noop.
8149 return;
8150 }
8151 // Deletions are added in reversed order so we add it to the front.
8152 // At this point, the return fiber's effect list is empty except for
8153 // deletions, so we can just append the deletion to the list. The remaining
8154 // effects aren't added until the complete phase. Once we implement
8155 // resuming, this may not be true.
8156 var last = returnFiber.lastEffect;
8157 if (last !== null) {
8158 last.nextEffect = childToDelete;
8159 returnFiber.lastEffect = childToDelete;
8160 } else {
8161 returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
8162 }
8163 childToDelete.nextEffect = null;
8164 childToDelete.effectTag = Deletion;
8165 }
8166
8167 function deleteRemainingChildren(returnFiber, currentFirstChild) {
8168 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