combineEpics()
, as the name suggests, allows you to take multiple epics and combine them into a single one.
Please keep in mind that the order in which epics are combined affect the order in which they are executed and receive actions.
...epics: Epic[]
: The epics to combine.
(Epic
): An Epic that merges the output of every Epic provided and passes along the ActionsObservable
and redux store as arguments.
import { combineEpics } from 'redux-observable';
import pingEpic from './ping';
import fetchUserEpic from './fetchUser';
export default combineEpics(
pingEpic,
fetchUserEpic
);