question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Effects do not catch the actions when `fork` inside `all` after `1.0.0-beta.3`

See original GitHub issue

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 except the redux-saga version.

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-sage 1.0.0-rc.0, 1.0.0-beta.3, 1.0.0-beta.2 , 1.0.0-beta.1, 0.16.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Andaristcommented, Jan 18, 2019

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.

1reaction
shinimacommented, Jan 18, 2019

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 takeEvery is already a wrapper of fork, fork(takeEvery, ...) is unneccessary. Just use takeEvery(...) 😸

Read more comments on GitHub >

github_iconTop Results From Across the Web

yelouafi/redux-saga
For instance this snippet lastTask = yield fork(saga, ...args.concat(action)); fails with the amusing message Expected at least 1 arguments, but got 1 or...
Read more >
redux-saga's fork model
This is a rule of thumb, you can't catch errors from forked tasks. A failure in an attached fork will cause the forking...
Read more >
New Bazecor 1.0.0 Beta 10 has arrived 🚆 : r/DygmaLab
Hi Dygmates! TLDR: We are working heavily on the new Dygma Raise configurator software, Bazecor 1.0. And we have Beta 10 ready.
Read more >
redux-saga does not work using "all" or "fork", but ...
Since you want to run newsSaga you can just call that saga in your rootSaga and make that saga run. Instead of yield...
Read more >
XSL Transformations (XSLT) Version 3.0
XSLT 3.0 does not require implementations to support XPath 3.1 in its ... The error can be suppressed by use of xsl:try and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found