Skip to content
IC Reactor

createActorMethodHooks

createActorMethodHooks<Service, Transform>(reactor): object

Defined in: react/src/hooks/useActorMethod.ts:487

Creates a bound useMethod hook for a specific reactor instance.

Service = BaseActor

Transform extends keyof TransformArgsRegistry<unknown> = "candid"

Reactor<Service, Transform>

useMethod: <Method>(config) => UseReactorMethodResult<Service, Method, Transform>

Hook for calling methods on the bound reactor.

Method extends string

Omit<UseReactorMethodParameters<Service, Method, Transform>, "reactor">

UseReactorMethodResult<Service, Method, Transform>

const { useMethod } = createActorMethodHooks(reactor)