You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both methods are ugly and more verbose than they need to be. What we could do instead is wrap the parent saga in another one that dispatches the _SUCCESS and _FAILURE action and handle errors.
The only responsibility of the child saga is then to signal the result by returning a success value or throwing an error.
The text was updated successfully, but these errors were encountered:
We pretty much decided we were not going to go forward with makeSimpleAsync because it's too inflexible and does not compose well with other sagas.
The other idea was
perform
, which is a very basic saga that just dispatches the_SUCCESS
or_FAILURE
action and uses an optional error handler.The problem is that
perform
has to signal the success or error to the parent saga, which can be done with an exception:or with a value
Both methods are ugly and more verbose than they need to be. What we could do instead is wrap the parent saga in another one that dispatches the
_SUCCESS
and_FAILURE
action and handle errors.The only responsibility of the child saga is then to signal the result by returning a success value or throwing an error.
The text was updated successfully, but these errors were encountered: