npm redux-saga 1.0.0-beta.1
v1.0.0-beta.1

latest releases: 1.3.0, 1.2.3, 1.2.2...
6 years ago

Error handling

Let's face it. Errors coming from redux-saga were unreadable and made finding a root cause of the problem really difficult. We really want to improve this situation and with this release (thanks to @restrry's amazing contribution) we start to log "saga stacks" along with original errors. This works similar to what React already does with its "component stacks". Just look at this one:
36414608-2ba4fb8e-1623-11e8-9fa9-0857a6fe63a0

You can even enhance those stacks with file names and line numbers by using in development our new babel-plugin-redux-saga (also thanks to @restrry). Let us know if there are any issues with this or if we can make them even more useful!

Also onError should get called now even if you throw non-Errors in your code.

Beside that few things have changed, you can read more about them below.

Added:

  • takeLeading effect - it takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)
  • redux@4 got in supported range (this will let npm dedupe redux in node_modules, keep in mind though that we only depend on compose from that package)

Changed:

  • delay became an effect, you still can import delay util from redux-saga/utils though

Don't miss a new redux-saga release

NewReleases is sending notifications on new releases.