Utilities that are useful with the SCEPTER framework
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.
reducerKey
: The reducer key to match.
sequence
: The saga to wrap
injectedIfValidReducerKey
: Optional. To be used to replace the default reducer key comparison logic.
This function is included in defaultMakeReducerSpecificSaga by default and compares reducer key to the one found in the action associated with the event.
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.