Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.16.0
->^1.0.0
Release Notes
redux-saga/redux-saga
v1.0.2
Compare Source
v1.0.1
Compare Source
v1.0.0
Compare Source
During work on v1, we made several breaking changes
Breaking changes
finally
block fail-safetakeEvery
,takeLatest
,throttle
from the redux-saga entry point (they are and were importable fromredux-saga/effects
).put.sync
andtakem
were removed.yield [...]
. useall
effect instead.delay
became an effect, olddelay
function (not effect!) can be imported from@redux-saga/delay-p
put.resolve
was changed toputResolve
take.maybe
was changed totakeMaybe
take
andput
methodstask.done
getter was changed to betask.toPromise
methodonError
doesn't extenderror
with additional fieldsagaStack
, but pass it as a property of second argument. before:onError: (e: Error)
, after:onError(e: Error, { sagaStack })
Effect
shape, yielded to redux-saga middleware, is stabilized and declared now as a plain JavaScript object{effects, utils}
aren't imported from 'redux-saga' anymore. imports them fromredux-saga/effects
,redux-saga/utils
is
helper should be imported from@redux-saga/is
.createMockTask
,cloneableGenerator
should be imported from@redux-saga/testing-utils
race
should be finished if any of effects resolved withEND
(by analogy with all)cancel(...[tasks])
andjoin(...[tasks])
tocancel([tasks])
andjoin([tasks])
respectively. also callingcancel(...)
returns a cancel-effect (before it may return anall
effect), and callingjoin(...)
returns a join-effect.{[IO]: true, [type]: payload }
to{ [IO]: true, type, payload }
to get rid of dynamictype
property. Could affect you if implement custom monitor for saga effects.arrayOfDeffered
got renamed to the correctarrayOfDeferred
New functionality
yield take(multicastChannel, pattern)
effectMiddlewares
- useful especially for testing, you can intercept/hijack any effect and resolve it on your own - passing it very redux-style to the next middleware (last being redux-saga itself). How it might be used can be checked here. Many thanks to @eloytoro for this featuretakeLeading
helper. It takes "leading" action and ignores all incoming ones of the same type while the "leading" is still handled (useful for things debouncing)retry
helper. Receives a function and executes it (with blocking call). In case of failure will try to make another call afterdelayLength
milliseconds, if a number of attempts <maxTries
parameterdebounce
helper. Spawns asaga
on an action dispatched to the Store that matchespattern
. Saga will be called after it stops takingpattern
actions forms
milliseconds. Purpose of this is to prevent calling saga until the actions are settled off.Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.