Skip to content

Instantly share code, notes, and snippets.

@borisd
Created February 15, 2016 12:41
Show Gist options
  • Save borisd/c51dc8250ae80a7669ef to your computer and use it in GitHub Desktop.
Save borisd/c51dc8250ae80a7669ef to your computer and use it in GitHub Desktop.
function *sample() {
yield take(STEP_1)
const result = yield call(someApi)
yield take(STEP_2)
...
yield take(STEP_3)
}
@yelouafi
Copy link

yield call(someApi) is a blocking effect. It means the take after will not be executed until the call to someApi resolves.

When do you want to cancel the call ? after take(STEP_2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment