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

Function commitHookEffectListUnmount

dash/deps/react-dom@18.2.0.js:23081–23131  ·  view source on GitHub ↗
(flags, finishedWork, nearestMountedAncestor)

Source from the content-addressed store, hash-verified

23079 }
23080
23081 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
23082 var updateQueue = finishedWork.updateQueue;
23083 var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
23084
23085 if (lastEffect !== null) {
23086 var firstEffect = lastEffect.next;
23087 var effect = firstEffect;
23088
23089 do {
23090 if ((effect.tag & flags) === flags) {
23091 // Unmount
23092 var destroy = effect.destroy;
23093 effect.destroy = undefined;
23094
23095 if (destroy !== undefined) {
23096 {
23097 if ((flags & Passive$1) !== NoFlags$1) {
23098 markComponentPassiveEffectUnmountStarted(finishedWork);
23099 } else if ((flags & Layout) !== NoFlags$1) {
23100 markComponentLayoutEffectUnmountStarted(finishedWork);
23101 }
23102 }
23103
23104 {
23105 if ((flags & Insertion) !== NoFlags$1) {
23106 setIsRunningInsertionEffect(true);
23107 }
23108 }
23109
23110 safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);
23111
23112 {
23113 if ((flags & Insertion) !== NoFlags$1) {
23114 setIsRunningInsertionEffect(false);
23115 }
23116 }
23117
23118 {
23119 if ((flags & Passive$1) !== NoFlags$1) {
23120 markComponentPassiveEffectUnmountStopped();
23121 } else if ((flags & Layout) !== NoFlags$1) {
23122 markComponentLayoutEffectUnmountStopped();
23123 }
23124 }
23125 }
23126 }
23127
23128 effect = effect.next;
23129 } while (effect !== firstEffect);
23130 }
23131 }
23132
23133 function commitHookEffectListMount(flags, finishedWork) {
23134 var updateQueue = finishedWork.updateQueue;

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…