mapActionToState method
This function just like registerEffects
but return Stream<State>
instead of Stream<Action>
.
mapActionToState([
action$.isA<AsyncIncAction>()
.delay(const Duration(milliseconds: 500))
.map((action) => state+1),
]);
Implementation
@protected
void mapActionToState(Iterable<Stream<S>> streams) {
_mapEffectsSubscription?.cancel();
_mapEffectsSubscription = Rx.merge(streams).listen(emit);
}