opened
purepennons
username_0
<!---
Thanks for reporting!

Search open/closed issues before submitting since someone might have asked the same thing before!
https://github.com/redux-saga/redux-saga/issues
-->

### Steps to reproduce

#### Description of the bug/issue
See the example. I run a saga by `fork` inside `all`. The effects (only tried `takeEvery` and `takeLatest`) do not catch the action and run the sagas after `1.0.0-beta.3` version.

#### Steps to reproduce the bug/issue
1.  click inc/dec button to increment/decrement the state.

#### Example
All examples are same expect the `redux-saga` version.

- `1.0.0-rc.0`: [https://codesandbox.io/s/nwlmw448np](https://codesandbox.io/s/nwlmw448np)
- `1.0.0-beta.3`: [https://codesandbox.io/s/1454688p7l](https://codesandbox.io/s/1454688p7l)
- `1.0.0-beta.2 `: [https://codesandbox.io/s/yx2m3no4z](https://codesandbox.io/s/yx2m3no4z)
- `0.16.2`: [https://codesandbox.io/s/nwlmw448np](https://codesandbox.io/s/nwlmw448np)

### Actual results
- Buttons of `1.0.0-rc.0` and `1.0.0-beta.3` have no responses. 
- `1.0.0-beta.2 ` and `0.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
<!--
- redux-saga version
- babel / typescript setup
- other related information
-->
- redux-sage `1.0.0-rc.0`, `1.0.0-beta.3`, `1.0.0-beta.2 `, `0.16.2`
Effects do not catch the actions when `fork` inside `all` after `1.0.0-beta.3`
issue
created
shinima
username_1
After changing...

```javascript
export function* process() {
  yield all([
    fork(takeEvery, Types.DO_INC, increment),
    fork(takeEvery, Types.DO_DEC, decrement)
  ]);
}
```

to

```javascript
export function* process() {
  yield all([
    takeEvery(Types.DO_INC, increment),
    takeEvery(Types.DO_DEC, decrement)
  ]);
}
```

... then everything works as expected.

Because `takeEvery` is already a wrapper of `fork`, `fork(takeEvery, ...)` is unneccessary. Just use `takeEvery(...)` 😸
comment
created
purepennons
username_0
I know, but that is a breaking change.
comment
created
Andarist
username_2
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.
comment
created
GuillaumeCisco
username_3
I have the exact same issue from version >= 1.0.0.
I use this pattern for loading my sagas:
```javascript
import {fork} from 'redux-saga/effects';
import my_saga from './my_saga';

export default function* root() {
    yield fork(my_saga);
}
```
The `my_saga.js` file looks like:
```javascript
import {takeLatest} from 'redux-saga/effects';

function* myGenerator(request) {
    // do stuff, yield stuff
}

export default function* () {
    yield all([
        takeLatest(MY_ACTION_TYPE, myGenerator),
    ]);
}
```

The `myGenerator` function is never called :/
comment
created
Andarist
username_2
could you prepare a codesandbox.io showcasing the problem?
comment
created
GuillaumeCisco
username_3
@username_2 Simply using the beginner tutorial.
Following: https://redux-saga.js.org/docs/introduction/BeginnerTutorial.html
github repo : https://github.com/redux-saga/redux-saga-beginner-tutorial
Clone it, go inside the `sagas` branch, modify the `package.json` for having `"redux-saga": "1.0.1"`.
Then, `yarn install`, `yarn run`.

Go to the webpage, it does not work on my computer.

yarn : 1.13.0
node : v11.10.0

If someone can confirm it.

codesandbox is here: https://codesandbox.io/s/nwj4jrm1n0
Thank you,
comment
created
shinima
username_1
@username_3 You should use `yield all([...])` instead of `yield [...]` in the root saga, and this is why the code is not working in 1.0.1.  

Actually, if you view the logs in 0.16.x, there is a deprecation warning which tells you to update the code.
comment
created
GuillaumeCisco
username_3
@username_1 I took the code from the official tutorial as you can see.
I succeeded to make the tutorial work by adding the `yield all([...])` and replacing the `yield call(delay, 1000)` by `yield delay(1000)` with an `import { all, put, takeEvery, delay } from "redux-saga/effects";`

The tutorial is not up to date.

Unfortunately, it changed nothing in my own project, effects are not called...
comment
created
GuillaumeCisco
username_3
Ok I just found out my issue.
I use `redux-sagas-injector` https://github.com/username_3/redux-sagas-injector.
I'm the maintainer of this lib.
Issue is `redux-sagas-injector` use a old version of `redux-saga` and is in charge to create the `sagaMiddleware`: `const sagaMiddleware = createSagaMiddleware();`

When mixing old and new versions of `redux-sagas` with dependencies, effects are not called.
I'm thinking how to make the code compatible for both versions without breaking changes...
comment
closed
Andarist
username_2
issue
created
Andarist
username_2
From what I see the @username_3 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
comment
created
GuillaumeCisco
username_3
Thanks @username_2.
However, I think the beginner tutorial should be updated ;)
comment
created
Andarist
username_2
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.
comment