createEffectAction function

Module @runic-artifex/views-effect in @runic-artifex/views-effect 0.23.0

function createEffectAction<Args extends readonly unknown[], A, E, R = never>(program: (...args: Args) => Effect.Effect<A, E, R>, ...[options]: [
    R
] extends [
    never
] ? [
    options?: EffectActionOptions<A, E, R>
] : [
    options: EffectActionOptions<A, E, R> & {
        readonly runFork: (effect: Effect.Effect<A, E, R>) => Fiber.Fiber<A, E>;
    }
]): EffectAction<Args, A, E> & AsyncDisposable;

Creates the framework-neutral runner behind useEffectAction. Framework bindings render current; run replaces an older run, as a search box or a repeated button press expects. An await using declaration disposes it where the engine has Symbol.asyncDispose.