@laserware/stasis
    Preparing search index...

    Interface RunSagaOptions<A, S>

    The {subscribe, dispatch} is used to fulfill take and put Effects. This defines the Input/Output interface of the Saga.

    subscribe is used to fulfill take(PATTERN) effects. It must call callback every time it has an input to dispatch (e.g. on every mouse click if the Saga is connected to DOM click events). Each time subscribe emits an input to its callbacks, if the Saga is blocked on a take effect, and if the take pattern matches the currently incoming input, the Saga is resumed with that input.

    dispatch is used to fulfill put effects. Each time the Saga emits a yield put(output), dispatch is invoked with output.

    interface RunSagaOptions<A, S> {
        channel?: PredicateTakeableChannel<A>;
        context?: object;
        effectMiddlewares?: EffectMiddleware[];
        sagaMonitor?: SagaMonitor;
        dispatch(output: A): any;
        getState(): S;
        onError(error: Error, errorInfo: ErrorInfo): void;
    }

    Type Parameters

    • A
    • S
    Index

    Properties

    channel?: PredicateTakeableChannel<A>

    See docs for channel

    context?: object

    See docs for createSagaMiddleware(options)

    effectMiddlewares?: EffectMiddleware[]

    See docs for createSagaMiddleware(options)

    sagaMonitor?: SagaMonitor

    See docs for createSagaMiddleware(options)

    Methods

    • Used to fulfill put effects.

      Parameters

      • output: A

        argument provided by the Saga to the put Effect

      Returns any

    • Used to fulfill select and getState effects

      Returns S

    • See docs for createSagaMiddleware(options)

      Parameters

      • error: Error
      • errorInfo: ErrorInfo

      Returns void