Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

useMutation

function useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(options: UseMutationOptions<TData, TError, TVariables, TContext>): UseMutationResult<TData, TError, TVariables, TContext>;
function useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationFn: MutationFunction<TData, TVariables>, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationFn">): UseMutationResult<TData, TError, TVariables, TContext>;
function useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationKey: MutationKey, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey">): UseMutationResult<TData, TError, TVariables, TContext>;
function useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(
mutationKey: MutationKey,
mutationFn?: MutationFunction<TData, TVariables>,
options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey" | "mutationFn">,
): UseMutationResult<TData, TError, TVariables, TContext>;
§
useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(options: UseMutationOptions<TData, TError, TVariables, TContext>): UseMutationResult<TData, TError, TVariables, TContext>
[src]

§Type Parameters

§
TData = unknown
[src]
§
TError = unknown
[src]
§
TVariables = void
[src]
§
TContext = unknown
[src]

§Parameters

§
options: UseMutationOptions<TData, TError, TVariables, TContext>
[src]

§Return Type

§
UseMutationResult<TData, TError, TVariables, TContext>
[src]
§
useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationFn: MutationFunction<TData, TVariables>, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationFn">): UseMutationResult<TData, TError, TVariables, TContext>
[src]

§Type Parameters

§
TData = unknown
[src]
§
TError = unknown
[src]
§
TVariables = void
[src]
§
TContext = unknown
[src]

§Parameters

§
mutationFn: MutationFunction<TData, TVariables>
[src]
§
options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationFn"> optional
[src]

§Return Type

§
UseMutationResult<TData, TError, TVariables, TContext>
[src]
§
useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationKey: MutationKey, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey">): UseMutationResult<TData, TError, TVariables, TContext>
[src]

§Type Parameters

§
TData = unknown
[src]
§
TError = unknown
[src]
§
TVariables = void
[src]
§
TContext = unknown
[src]

§Parameters

§
mutationKey: MutationKey
[src]
§
options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey"> optional
[src]

§Return Type

§
UseMutationResult<TData, TError, TVariables, TContext>
[src]
§
useMutation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationKey: MutationKey, mutationFn?: MutationFunction<TData, TVariables>, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey" | "mutationFn">): UseMutationResult<TData, TError, TVariables, TContext>
[src]

§Type Parameters

§
TData = unknown
[src]
§
TError = unknown
[src]
§
TVariables = void
[src]
§
TContext = unknown
[src]

§Parameters

§
mutationKey: MutationKey
[src]
§
mutationFn?: MutationFunction<TData, TVariables> optional
[src]
§
options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, "mutationKey" | "mutationFn"> optional
[src]

§Return Type

§
UseMutationResult<TData, TError, TVariables, TContext>
[src]