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
// NOTE(lmr):
// it's debatable whether or not we want `.then(success, failure)`
// versus `.then(success).catch(failure)`
Well, I'd like to spark that debate. Right now this is working completely contrary to the Promise spec, which is making the promise returned from the action creator not play nicely with other libraries, and making chaining off of it pretty unintuitive.
I understand that chaining off the action creator is not something that should be done heavily, but sometimes (and especially in the case of an error) it is ideal to be able to handle the error case at the point of action creator invocation.
I have found that storing error states in the store can lead to issues where error messages persist for the entire life of the app, even though they should be ephemeral.
My preference for the ephemeral case is to handle that catch in the component layer, rather than in at the store layer.
Thoughts?
The text was updated successfully, but these errors were encountered:
Noticed this in the the middleware src:
Well, I'd like to spark that debate. Right now this is working completely contrary to the Promise spec, which is making the promise returned from the action creator not play nicely with other libraries, and making chaining off of it pretty unintuitive.
I understand that chaining off the action creator is not something that should be done heavily, but sometimes (and especially in the case of an error) it is ideal to be able to handle the error case at the point of action creator invocation.
I have found that storing error states in the store can lead to issues where error messages persist for the entire life of the app, even though they should be ephemeral.
My preference for the ephemeral case is to handle that catch in the component layer, rather than in at the store layer.
Thoughts?
The text was updated successfully, but these errors were encountered: