Skip to content

Instantly share code, notes, and snippets.

@indatawetrust
Created December 15, 2019 12:16
Show Gist options
  • Save indatawetrust/bae2dc147ae9f7f05576a44c1e89d215 to your computer and use it in GitHub Desktop.
Save indatawetrust/bae2dc147ae9f7f05576a44c1e89d215 to your computer and use it in GitHub Desktop.
redux-saga cps effect
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