Skip to main content

Interface: UseMutation<GeneratedSchema>#

Type parameters#

NameType
GeneratedSchemaobject
GeneratedSchema.mutationobject

Callable#

â–¸ UseMutation<TData, TArgs>(mutationFn?: (mutation: GeneratedSchema[mutation], args: TArgs) => TData, options?: UseMutationOptions<TData>): readonly [(...opts: undefined extends TArgs ? [object?] : [{ args: TArgs ; fn?: (mutation: GeneratedSchema[mutation], args: TArgs) => TData }]) => Promise<TData>, UseMutationState<TData>]

Type parameters:#

NameDefault
TDataunknown
TArgsundefined

Parameters:#

NameType
mutationFn?(mutation: GeneratedSchema[mutation], args: TArgs) => TData
options?UseMutationOptions<TData>

Returns: readonly [(...opts: undefined extends TArgs ? [object?] : [{ args: TArgs ; fn?: (mutation: GeneratedSchema[mutation], args: TArgs) => TData }]) => Promise<TData>, UseMutationState<TData>]

Defined in: react/src/mutation/useMutation.ts:89

Last updated on by Sam Denty