Created
February 15, 2016 12:41
-
-
Save borisd/c51dc8250ae80a7669ef to your computer and use it in GitHub Desktop.
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
function *sample() { | |
yield take(STEP_1) | |
const result = yield call(someApi) | |
yield take(STEP_2) | |
... | |
yield take(STEP_3) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
yield call(someApi)
is a blocking effect. It means thetake
after will not be executed until the call tosomeApi
resolves.When do you want to cancel the call ? after
take(STEP_2)