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

Function deleteRemainingChildren

code/new-context-api/public/app.js:8295–8309  ·  view source on GitHub ↗
(returnFiber, currentFirstChild)

Source from the content-addressed store, hash-verified

8293 }
8294
8295 function deleteRemainingChildren(returnFiber, currentFirstChild) {
8296 if (!shouldTrackSideEffects) {
8297 // Noop.
8298 return null;
8299 }
8300
8301 // TODO: For the shouldClone case, this could be micro-optimized a bit by
8302 // assuming that after the first child we've already added everything.
8303 var childToDelete = currentFirstChild;
8304 while (childToDelete !== null) {
8305 deleteChild(returnFiber, childToDelete);
8306 childToDelete = childToDelete.sibling;
8307 }
8308 return null;
8309 }
8310
8311 function mapRemainingChildren(returnFiber, currentFirstChild) {
8312 // Add the remaining children to a temporary map so that we can find them by

Callers 6

reconcileChildrenArrayFunction · 0.70
reconcileSingleTextNodeFunction · 0.70
reconcileSingleElementFunction · 0.70
reconcileSinglePortalFunction · 0.70
reconcileChildFibersFunction · 0.70

Calls 1

deleteChildFunction · 0.70

Tested by

no test coverage detected