function / @typed/react/Hooks

useAction

Event-driven Effects with refresh status, typed failures, cancellation and unmount cleanup.

Package version
1.0.0-beta.13
Category
function

Import

import { useAction } from "@typed/react/Hooks";

Signatures

export declare function useAction<Args extends ReadonlyArray<unknown>, A, E, R, ER = never>(action: (...args: Args) => Effect.Effect<A, E, R>, options?: Omit<ReactiveOptions<A, E, R, ER>, "immediate">): ActionState<Args, A, E | ER>;

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source