-
-
Save OliverJAsh/ac163485a894390469d73019ae4a058c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rootEpic: Epic<Action, Action, State> = ( | |
action$, | |
state$ | |
) => { | |
const counterStates$ = state$.map( | |
state => state.counterStates | |
); | |
// Given a list and an epic for each list item, return an | |
// Observable of the actions for all list items. | |
const counterStateAction$ = counterStates$.pipe( | |
runListEpics({ | |
action$, | |
listItemEpic: counterEpic, | |
getListItemKey: counterState => counterState.id, | |
selectListItem: getCounterState | |
}) | |
); | |
return counterStateAction$; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment