-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Effects do not catch the actions when fork
inside all
after 1.0.0-beta.3
#1733
Comments
After changing... export function* process() {
yield all([
fork(takeEvery, Types.DO_INC, increment),
fork(takeEvery, Types.DO_DEC, decrement)
]);
} to export function* process() {
yield all([
takeEvery(Types.DO_INC, increment),
takeEvery(Types.DO_DEC, decrement)
]);
} ... then everything works as expected. Because |
@shinima |
Yes, we know - that's why it is listed in https://github.com/redux-saga/redux-saga/releases/tag/v1.0.0-beta.3 "Fixed" section. |
I have the exact same issue from version >= 1.0.0. import {fork} from 'redux-saga/effects';
import my_saga from './my_saga';
export default function* root() {
yield fork(my_saga);
} The import {takeLatest} from 'redux-saga/effects';
function* myGenerator(request) {
// do stuff, yield stuff
}
export default function* () {
yield all([
takeLatest(MY_ACTION_TYPE, myGenerator),
]);
} The |
could you prepare a codesandbox.io showcasing the problem? |
@Andarist Simply using the beginner tutorial. Go to the webpage, it does not work on my computer. yarn : 1.13.0 If someone can confirm it. codesandbox is here: https://codesandbox.io/s/nwj4jrm1n0 |
@GuillaumeCisco You should use Actually, if you view the logs in 0.16.x, there is a deprecation warning which tells you to update the code. |
@shinima I took the code from the official tutorial as you can see. The tutorial is not up to date. Unfortunately, it changed nothing in my own project, effects are not called... |
Ok I just found out my issue. When mixing old and new versions of |
From what I see the @GuillaumeCisco has handled the problem on his side (inside redux-saga-injector) and originally reported issue actually works as expected - therefore Im closing this issue as resolved, feel free to open new issues though if needed |
Thanks @Andarist. |
I think it's already updated - if you can please check it in the git repository, not on the website. I'm planning to redeploy docs website after doing a patch release which I'm sort of preparing right now. |
Steps to reproduce
Description of the bug/issue
See the example. I run a saga by
fork
insideall
. The effects (only triedtakeEvery
andtakeLatest
) do not catch the action and run the sagas after1.0.0-beta.3
version.Steps to reproduce the bug/issue
Example
All examples are same except the
redux-saga
version.1.0.0-rc.0
: https://codesandbox.io/s/nwlmw448np1.0.0-beta.3
: https://codesandbox.io/s/1454688p7l1.0.0-beta.2
: https://codesandbox.io/s/yx2m3no4z1.0.0-beta.1
: https://codesandbox.io/s/31zx718r160.16.2
: https://codesandbox.io/s/yvmqz37j31Actual results
1.0.0-rc.0
and1.0.0-beta.3
have no responses.1.0.0-beta.2
and0.16.2
take all actions and increment/decrement the state correctly.The Expected results
All version should take all actions and increment/decrement the state correctly.
Environment information
1.0.0-rc.0
,1.0.0-beta.3
,1.0.0-beta.2
,1.0.0-beta.1
,0.16.2
The text was updated successfully, but these errors were encountered: