MCPcopy Index your code
hub / github.com/plotly/dash / commitPassiveUnmountEffects_begin

Function commitPassiveUnmountEffects_begin

dash/deps/react-dom@18.2.0.js:24954–25009  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24952 }
24953
24954 function commitPassiveUnmountEffects_begin() {
24955 while (nextEffect !== null) {
24956 var fiber = nextEffect;
24957 var child = fiber.child;
24958
24959 if ((nextEffect.flags & ChildDeletion) !== NoFlags) {
24960 var deletions = fiber.deletions;
24961
24962 if (deletions !== null) {
24963 for (var i = 0; i < deletions.length; i++) {
24964 var fiberToDelete = deletions[i];
24965 nextEffect = fiberToDelete;
24966 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);
24967 }
24968
24969 {
24970 // A fiber was deleted from this parent fiber, but it's still part of
24971 // the previous (alternate) parent fiber's list of children. Because
24972 // children are a linked list, an earlier sibling that's still alive
24973 // will be connected to the deleted fiber via its `alternate`:
24974 //
24975 // live fiber
24976 // --alternate--> previous live fiber
24977 // --sibling--> deleted fiber
24978 //
24979 // We can't disconnect `alternate` on nodes that haven't been deleted
24980 // yet, but we can disconnect the `sibling` and `child` pointers.
24981 var previousFiber = fiber.alternate;
24982
24983 if (previousFiber !== null) {
24984 var detachedChild = previousFiber.child;
24985
24986 if (detachedChild !== null) {
24987 previousFiber.child = null;
24988
24989 do {
24990 var detachedSibling = detachedChild.sibling;
24991 detachedChild.sibling = null;
24992 detachedChild = detachedSibling;
24993 } while (detachedChild !== null);
24994 }
24995 }
24996 }
24997
24998 nextEffect = fiber;
24999 }
25000 }
25001
25002 if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {
25003 child.return = fiber;
25004 nextEffect = child;
25005 } else {
25006 commitPassiveUnmountEffects_complete();
25007 }
25008 }
25009 }
25010
25011 function commitPassiveUnmountEffects_complete() {

Callers 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…