terrierscript
1/10/2017 - 11:46 AM

redux-observable-playground.js

require("rxjs")

const Rx = require("rxjs")
const { ActionsObservable } = require("redux-observable")

const playgroundEpic = action$ =>
  action$.ofType("FIRST")
    .map( (a) =>( { type: "THIRD" } ) )

const action$ = ActionsObservable.of({ type: 'FIRST' }, { type: 'SECOND' })

playgroundEpic(action$).subscribe(x => console.log("RECEIVE", x))