@playlive/react-query
    Preparing search index...

    Interface UseMutationResult<TData, TVariables>

    Standard mutation return shape used by every donation-train mutation hook. Same fields (mutate, mutateAsync, isPending, error, data, reset) TanStack Query's useMutation exposes, projected here so consumers don't have to depend on @tanstack/react-query's types directly.

    interface UseMutationResult<TData, TVariables> {
        data: TData | undefined;
        error: Error | null;
        isPending: boolean;
        mutate: (variables: TVariables) => void;
        mutateAsync: (variables: TVariables) => Promise<TData>;
        reset: () => void;
    }

    Type Parameters

    • TData
    • TVariables
    Index
    data: TData | undefined

    Latest resolved value, or undefined before the first success.

    error: Error | null

    Latest error, or null on success / idle.

    isPending: boolean

    true while the mutation is in flight.

    mutate: (variables: TVariables) => void

    Fire-and-forget invocation. Errors surface via error.

    mutateAsync: (variables: TVariables) => Promise<TData>

    Awaitable invocation. Rejects on failure.

    reset: () => void

    Reset the mutation to its initial idle state.