Skip to content

API Documentation / @pinia/colada / UseMutationContextCommon

Interface: UseMutationContextCommon<TData, TVars, TError, TContext> ​

Common context properties shared by all mutation hooks. Contains the mutation entry with optional generics for type-safe access in local hooks.

Type Parameters ​

TData ​

TData = unknown

TVars ​

TVars = unknown

TError ​

TError = unknown

TContext ​

TContext extends Record<any, any> = _EmptyObject

Properties ​

entry ​

ts
entry: UseMutationEntry<TData, TVars, TError, TContext>;

The mutation entry associated with the current mutation call.


mutationCache ​

ts
mutationCache: Store;

The mutation cache that owns the entry.


signal ​

ts
signal: AbortSignal;

Signal aborted when the mutation is cancelled with MutationCache.cancel. Pass it to your requests.

Released under the MIT License.