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

Function commitAllLifeCycles

code/styling/public/app.js:12883–12919  ·  view source on GitHub ↗
(finishedRoot, currentTime, committedExpirationTime)

Source from the content-addressed store, hash-verified

12881 }
12882
12883 function commitAllLifeCycles(finishedRoot, currentTime, committedExpirationTime) {
12884 {
12885 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12886
12887 if (warnAboutDeprecatedLifecycles) {
12888 ReactStrictModeWarnings.flushPendingDeprecationWarnings();
12889 }
12890 }
12891 while (nextEffect !== null) {
12892 var effectTag = nextEffect.effectTag;
12893
12894 if (effectTag & (Update | Callback)) {
12895 recordEffect();
12896 var current = nextEffect.alternate;
12897 commitLifeCycles(finishedRoot, current, nextEffect, currentTime, committedExpirationTime);
12898 }
12899
12900 if (effectTag & ErrLog) {
12901 commitErrorLogging(nextEffect, onUncaughtError);
12902 }
12903
12904 if (effectTag & Ref) {
12905 recordEffect();
12906 commitAttachRef(nextEffect);
12907 }
12908
12909 var next = nextEffect.nextEffect;
12910 // Ensure that we clean these up so that we don't accidentally keep them.
12911 // I'm not actually sure this matters because we can't reset firstEffect
12912 // and lastEffect since they're on every node, not just the effectful
12913 // ones. So we have to clean everything as we reuse nodes anyway.
12914 nextEffect.nextEffect = null;
12915 // Ensure that we reset the effectTag here so that we can rely on effect
12916 // tags to reason about the current life-cycle.
12917 nextEffect = next;
12918 }
12919 }
12920
12921 function isAlreadyFailedLegacyErrorBoundary(instance) {
12922 return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);

Callers

nothing calls this directly

Calls 4

recordEffectFunction · 0.70
commitLifeCyclesFunction · 0.70
commitErrorLoggingFunction · 0.70
commitAttachRefFunction · 0.70

Tested by

no test coverage detected