Sawtaytoes
10/16/2019 - 7:33 AM

Redux-Observable v1 dispatch

const someEpic = (
  action$,
) => (
  action$
  .pipe(
    ofType(FETCH_DATA),
    switchMap(() => (
      ajax('/data')
      .pipe(
        switchMap((
          response,
        ) => (
          of(
            doSomething(),
            fetchSucceeded(response),
          )
        )),
      )
    )
  )
)