Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
if (effectTag & Snapshot) {
        recordEffect();
        const current = nextEffect.alternate;
        commitBeforeMutationLifeCycles(current, nextEffect);
      }
      // Don't cleanup effects yet;
      // This will be done by commitAllLifeCycles()
      nextEffect = nextEffect.nextEffect;
    }
  }
  function commitAllLifeCycles(
    finishedRoot: FiberRoot,
    currentTime: ExpirationTime,
    committedExpirationTime: ExpirationTime,
  ) {
    if (__DEV__) {
      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
      if (warnAboutDeprecatedLifecycles) {
        ReactStrictModeWarnings.flushPendingDeprecationWarnings();
      }
    }
    while (nextEffect !== null) {
      const effectTag = nextEffect.effectTag;
      if (effectTag & (Update | Callback)) {
        recordEffect();
        const current = nextEffect.alternate;
        commitLifeCycles(
          finishedRoot,
          current,
          nextEffect,