@laserware/stasis
    Preparing search index...

    Interface SagaMonitor

    Used by the middleware to dispatch monitoring events. Actually the middleware dispatches 6 events:

    • When a root saga is started (via runSaga or sagaMiddleware.run) the middleware invokes sagaMonitor.rootSagaStarted

    • When an effect is triggered (via yield someEffect) the middleware invokes sagaMonitor.effectTriggered

    • If the effect is resolved with success the middleware invokes sagaMonitor.effectResolved

    • If the effect is rejected with an error the middleware invokes sagaMonitor.effectRejected

    • If the effect is cancelled the middleware invokes sagaMonitor.effectCancelled

    • Finally, the middleware invokes sagaMonitor.actionDispatched when a Redux action is dispatched.

    interface SagaMonitor {
        actionDispatched(action: Action): void;
        effectCancelled(effectId: number): void;
        effectRejected(effectId: number, error: any): void;
        effectResolved(effectId: number, result: any): void;
        effectTriggered(
            options: {
                effect: any;
                effectId: number;
                label?: string;
                parentEffectId: number;
            },
        ): void;
        rootSagaStarted(
            options: { args: any[]; effectId: number; saga: Saga },
        ): void;
    }
    Index

    Methods

    • Parameters

      • action: Action

        The dispatched Redux action. If the action was dispatched by a Saga then the action will have a property SAGA_ACTION set to true (SAGA_ACTION can be imported from @redux-saga/symbols).

      Returns void

    • Parameters

      • effectId: number

        The ID of the yielded effect

      Returns void

    • Parameters

      • effectId: number

        The ID of the yielded effect

      • error: any

        Error raised with the rejection of the effect

      Returns void

    • Parameters

      • effectId: number

        The ID of the yielded effect

      • result: any

        The result of the successful resolution of the effect. In case of fork or spawn effects, the result will be a Task object.

      Returns void

    • Parameters

      • options: { effect: any; effectId: number; label?: string; parentEffectId: number }

      Returns void

    • Parameters

      • options: { args: any[]; effectId: number; saga: Saga }

      Returns void