Skip to content

Instantly share code, notes, and snippets.

View tryenc's full-sized avatar

Christopher Tryens tryenc

  • Comcast
  • Philadelphia, PA
View GitHub Profile
There is no requirement that you make a one-to-one in/out ratio. So you can emit multiple actions using flatMap if you need to:
const loaded = (results) => ({type: 'RESULTS_LOADED', results});
const otherAction = (results) => ({type: 'MY_OTHER_ACTION', results});
searchEpic = (action$) =>
action$
.ofType('SEARCH')
.mergeMap(
Observable