Created
February 7, 2017 17:24
-
-
Save steezeburger/b5c972ec2f3b00f2e5bd8f2053f8caca to your computer and use it in GitHub Desktop.
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 { takeEvery } from 'redux-saga'; // works w/ deprecation warning | |
// import { takeEvery } from 'redux-saga/effects'; // proper according to docs but does not work | |
export const dispatchAfter = (actions, secondAction) => function*() { | |
yield* takeEvery(actions, function* (action) { | |
yield secondAction(action); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment