2020 年更新
import { concat, of } from 'rxjs';
import { combineEpics } from 'redux-observable';
import { catchError } from 'rxjs/operators';
export const rootEpic = (action$, store) =>
combineEpics(epic1, epic2, epic3)(action$, store)
.pipe((error, caught) => concat(caught));
import { createEpicMiddleware } from 'redux-observable';
const epicMiddleware = createEpicMiddleware();
epicMiddleware.run((action$, store) => rootEpics(action$, store));
您还可以像这样传递 redux 错误操作:
concat(of(reduxActionForError), caught));