Created
December 15, 2019 12:16
-
-
Save indatawetrust/bae2dc147ae9f7f05576a44c1e89d215 to your computer and use it in GitHub Desktop.
redux-saga cps effect
This file contains hidden or 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
const response = yield cps(cb => | |
new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, 1000); | |
}).then(data => cb(null, data)) | |
.catch(error => cb(error)) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment