MCPcopy Create free account
hub / github.com/plotly/dash / commitHookEffectListUnmount

Function commitHookEffectListUnmount

dash/deps/react-dom@18.3.1.js:23120–23170  ·  view source on GitHub ↗
(flags, finishedWork, nearestMountedAncestor)

Source from the content-addressed store, hash-verified

23118 }
23119
23120 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
23121 var updateQueue = finishedWork.updateQueue;
23122 var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
23123
23124 if (lastEffect !== null) {
23125 var firstEffect = lastEffect.next;
23126 var effect = firstEffect;
23127
23128 do {
23129 if ((effect.tag & flags) === flags) {
23130 // Unmount
23131 var destroy = effect.destroy;
23132 effect.destroy = undefined;
23133
23134 if (destroy !== undefined) {
23135 {
23136 if ((flags & Passive$1) !== NoFlags$1) {
23137 markComponentPassiveEffectUnmountStarted(finishedWork);
23138 } else if ((flags & Layout) !== NoFlags$1) {
23139 markComponentLayoutEffectUnmountStarted(finishedWork);
23140 }
23141 }
23142
23143 {
23144 if ((flags & Insertion) !== NoFlags$1) {
23145 setIsRunningInsertionEffect(true);
23146 }
23147 }
23148
23149 safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);
23150
23151 {
23152 if ((flags & Insertion) !== NoFlags$1) {
23153 setIsRunningInsertionEffect(false);
23154 }
23155 }
23156
23157 {
23158 if ((flags & Passive$1) !== NoFlags$1) {
23159 markComponentPassiveEffectUnmountStopped();
23160 } else if ((flags & Layout) !== NoFlags$1) {
23161 markComponentLayoutEffectUnmountStopped();
23162 }
23163 }
23164 }
23165 }
23166
23167 effect = effect.next;
23168 } while (effect !== firstEffect);
23169 }
23170 }
23171
23172 function commitHookEffectListMount(flags, finishedWork) {
23173 var updateQueue = finishedWork.updateQueue;

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…