@laserware/stasis
    Preparing search index...

    Namespace effects

    Type Aliases

    AllButLast

    [...A, B] -> A

    Tail

    [H, ...T] -> T

    Functions

    actionChannel

    Creates an effect that instructs the middleware to queue the actions matching pattern using an event channel. Optionally, you can provide a buffer to control buffering of the queued actions.

    all

    Creates an Effect description that instructs the middleware to run multiple Effects in parallel and wait for all of them to complete. It's quite the corresponding API to standard Promise#all.

    apply

    Alias for call([context, fn], ...args).

    call

    Creates an Effect description that instructs the middleware to call the function fn with args as arguments.

    cancel

    Creates an Effect description that instructs the middleware to cancel a previously forked task.

    cancelled

    Creates an effect that instructs the middleware to return whether this generator has been cancelled. Typically you use this Effect in a finally block to run Cancellation specific code

    cps

    Creates an Effect description that instructs the middleware to invoke fn as a Node style function.

    debounce

    Spawns a saga on an action dispatched to the Store that matches pattern. Saga will be called after it stops taking pattern actions for ms milliseconds. Purpose of this is to prevent calling saga until the actions are settled off.

    delay

    Returns an effect descriptor to block execution for ms milliseconds and return val value.

    flush

    Creates an effect that instructs the middleware to flush all buffered items from the channel. Flushed items are returned back to the saga, so they can be utilized if needed.

    fork

    Creates an Effect description that instructs the middleware to perform a non-blocking call on fn

    getContext

    Creates an effect that instructs the middleware to return a specific property of saga's context.

    join

    Creates an Effect description that instructs the middleware to wait for the result of a previously forked task.

    put

    Creates an Effect description that instructs the middleware to dispatch an action to the Store. This effect is non-blocking, any errors that are thrown downstream (e.g. in a reducer) will bubble back into the saga.

    putResolve

    Just like put but the effect is blocking (if promise is returned from dispatch it will wait for its resolution) and will bubble up errors from downstream.

    race

    Creates an Effect description that instructs the middleware to run a Race between multiple Effects (this is similar to how Promise.race([...]) behaves).

    retry

    Creates an Effect description that instructs the middleware to call the function fn with args as arguments. In case of failure will try to make another call after delay milliseconds, if a number of attempts < maxTries.

    select

    Creates an effect that instructs the middleware to invoke the provided selector on the current Store's state (i.e. returns the result of selector(getState(), ...args)).

    setContext

    Creates an effect that instructs the middleware to update its own context. This effect extends saga's context instead of replacing it.

    spawn

    Same as fork(fn, ...args) but creates a detached task. A detached task remains independent from its parent and acts like a top-level task. The parent will not wait for detached tasks to terminate before returning and all events which may affect the parent or the detached task are completely independents (error, cancellation).

    take

    Creates an Effect description that instructs the middleware to wait for a specified action on the Store. The Generator is suspended until an action that matches pattern is dispatched.

    takeEvery

    Spawns a saga on each action dispatched to the Store that matches pattern.

    takeLatest

    Spawns a saga on each action dispatched to the Store that matches pattern. And automatically cancels any previous saga task started previously if it's still running.

    takeLeading

    Spawns a saga on each action dispatched to the Store that matches pattern. After spawning a task once, it blocks until spawned saga completes and then starts to listen for a pattern again.

    takeMaybe

    Same as take(pattern) but does not automatically terminate the Saga on an END action. Instead all Sagas blocked on a take Effect will get the END object.

    throttle

    Spawns a saga on an action dispatched to the Store that matches pattern. After spawning a task it's still accepting incoming actions into the underlying buffer, keeping at most 1 (the most recent one), but in the same time holding up with spawning new task for ms milliseconds (hence its name - throttle). Purpose of this is to ignore incoming actions for a given period of time while processing a task.