epics.js 330 B

1234567891011121314151617181920
  1. import { combineEpics } from 'redux-observable';
  2. import 'rxjs';// used for example epic
  3. const rootEpic = combineEpics(
  4. );
  5. // use this
  6. //export { rootEpic as default };
  7. // delete example
  8. export default function exampleEpic(action$) {
  9. return action$.filter(x => x.type === 'PING')
  10. .mapTo({type: 'PONG'});
  11. };