1.0.0 • Published 6 years ago

@source4society/scepter-saga-utilities v1.0.0

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
6 years ago

SCEPTER-saga-utilities

Utilities that are useful with the SCEPTER framework

scepter-logo

airbnb-codestyle

Build Status

codecov

defaultMakeReducerSpecificSaga

This function will wrap any generator and cause it to be reducer specific (it won't execute the saga if the reducer key does not match, even if it is listening for the same event).

It includes defaultIfValidReducerKey as the mechanism for comparing reducer keys.

Arguments

reducerKey: The reducer key to match. sequence: The saga to wrap injectedIfValidReducerKey: Optional. To be used to replace the default reducer key comparison logic.

defaultIfValidReducerKey

This function is included in defaultMakeReducerSpecificSaga by default and compares reducer key to the one found in the action associated with the event.

Arguments

reducerKey: The reducerKey associated with the reducer key specific saga. action: The action containing the reducerKey of the event callback: The wrapped generator, usually a saga.