Skip to content
IC Reactor

UseReactorMutationParameters

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

Service

Method extends FunctionName<Service>

Transform extends TransformKey = "candid"

TOnMutateResult = unknown

reactor: Reactor<Service, Transform>

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


functionName: Method

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


optional callConfig?: CallConfig

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


optional invalidateQueries?: (readonly unknown[] | undefined)[]

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

Queries to invalidate upon successful mutation.

undefined entries are skipped, so the common [maybeQuery?.getQueryKey()] idiom is safe when the optional query object is absent.


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

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

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