UseReactorMutationParameters
Defined in: react/src/hooks/useActorMutation.ts:23
Extends
Section titled “Extends”Omit<UseMutationOptions<ReactorReturnOk<Service,Method,Transform>,ReactorReturnErr<Service,Method,Transform>,ReactorArgs<Service,Method,Transform>,TOnMutateResult>,"mutationFn">
Type Parameters
Section titled “Type Parameters”Service
Section titled “Service”Service
Method
Section titled “Method”Method extends FunctionName<Service>
Transform
Section titled “Transform”Transform extends TransformKey = "candid"
TOnMutateResult
Section titled “TOnMutateResult”TOnMutateResult = unknown
Properties
Section titled “Properties”reactor
Section titled “reactor”reactor:
Reactor<Service,Transform>
Defined in: react/src/hooks/useActorMutation.ts:37
functionName
Section titled “functionName”functionName:
Method
Defined in: react/src/hooks/useActorMutation.ts:38
callConfig?
Section titled “callConfig?”
optionalcallConfig?:CallConfig
Defined in: react/src/hooks/useActorMutation.ts:39
invalidateQueries?
Section titled “invalidateQueries?”
optionalinvalidateQueries?: (readonlyunknown[] |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.
onCanisterError?
Section titled “onCanisterError?”
optionalonCanisterError?: (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.
Parameters
Section titled “Parameters”CanisterError<TransformReturnRegistry<ErrResult<ActorMethodReturnType<Service[Method]>>, Service>[Transform]>
variables
Section titled “variables”ReactorArgs<Service, Method, Transform>
Returns
Section titled “Returns”void