Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
}
  }
  function scheduleCapture(sourceFiber, boundaryFiber, value, expirationTime) {
    
    const capturedValue = createCapturedValue(value, sourceFiber);
    const update = {
      expirationTime,
      partialState: null,
      callback: null,
      isReplace: false,
      isForced: false,
      capturedValue,
      next: null,
    };
    insertUpdateIntoFiber(boundaryFiber, update);
    scheduleWork(boundaryFiber, expirationTime);
  }
  function dispatch(
    sourceFiber: Fiber,
    value: mixed,
    expirationTime: ExpirationTime,
  ) {
    invariant(
      !isWorking || isCommitting,
      'dispatch: Cannot dispatch during the render phase.',
    );
    
    let fiber = sourceFiber.return;
    while (fiber !== null) {
      switch (fiber.tag) {