const rejectPendingValue = React.useCallback((): void => {
    // Avoid a pointless idempotent state change if the consumer-provided
    // compare callback considers the current and pending values to be equal.
    if (stateRef.current.hasPendingValue) {
      formRef.current.rejectPendingValue(pathRef.current);