Skip to content

Instantly share code, notes, and snippets.

@dezfowler
Created April 4, 2019 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dezfowler/5192529ce93836aef3486e22846e1228 to your computer and use it in GitHub Desktop.
Save dezfowler/5192529ce93836aef3486e22846e1228 to your computer and use it in GitHub Desktop.
redux-observable simple example
import { ofType } from 'redux-observable';
const pingEpic = action$ => action$.pipe(
ofType('PING'),
delay(1000), // Asynchronously wait 1000ms then continue
mapTo({ type: 'PONG' })
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment