Created
April 4, 2019 07:14
-
-
Save dezfowler/5192529ce93836aef3486e22846e1228 to your computer and use it in GitHub Desktop.
redux-observable simple example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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