Skip to content
IC Reactor

UseReactorMutationParameters

Defined in: react/src/hooks/useActorMutation.ts:24

Service

Method extends FunctionName<Service>

Transform extends TransformKey = "candid"

TOnMutateResult = unknown

reactor: Reactor<Service, Transform>

Defined in: react/src/hooks/useActorMutation.ts:38


functionName: Method

Defined in: react/src/hooks/useActorMutation.ts:39


optional callConfig?: CallConfig

Defined in: react/src/hooks/useActorMutation.ts:40


optional invalidateQueries?: InvalidationTarget<Service, Transform>[]

Defined in: react/src/hooks/useActorMutation.ts:50

Queries to invalidate upon successful mutation, awaited before onSuccess runs.

Each entry is a query key, a query object or query factory, or a { functionName, args? } method of reactor; see InvalidationTarget. undefined entries are skipped, so [maybeQuery] is safe when the optional query object is absent.


optional onCanisterError?: (error, variables) => void

Defined in: react/src/hooks/useActorMutation.ts:56

Callback for canister-level business logic errors. Called when the canister returns a Result { Err: E } variant. Separate from onError, which fires for all errors including network failures.

CanisterError<TransformReturnRegistry<ErrResult<ActorMethodReturnType<Service[Method]>>, Service>[Transform]>

ReactorArgs<Service, Method, Transform>

void