Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
invokeGuardedCallback(null, workLoop, null, isAsync);
      if (hasCaughtError()) {
        clearCaughtError();
      } else {
        
        
      }
    };
  }
  function resetStack() {
    if (nextUnitOfWork !== null) {
      let interruptedWork = nextUnitOfWork.return;
      while (interruptedWork !== null) {
        unwindInterruptedWork(interruptedWork);
        interruptedWork = interruptedWork.return;
      }
    }
    if (__DEV__) {
      ReactStrictModeWarnings.discardPendingWarnings();
      stack.checkThatStackIsEmpty();
    }
    nextRoot = null;
    nextRenderExpirationTime = NoWork;
    nextUnitOfWork = null;
    isRootReadyForCommit = false;
  }
  function commitAllHostEffects() {
    while (nextEffect !== null) {
      if (__DEV__) {