-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] 3-phase async dispatch #100
Comments
I was thinking of something like this: As discussed in Slack, it might be better to create an organization and have a few “blessed” middlewares coming from it, with separate versioning from Redux. |
Oh wait, I actually meant this: #99 (comment) (Which is why it should have separate versioning lol) |
Yeah I agree. But something like you mentioned on the other issue seems like it would be a good candidate for one such middleware. Maybe not in the exact way, but similar (I'm still trying to figure out how to use less constants ;) ) |
Can we also have an auto-dispatch |
so a 4-phase dispatch - begin, success/failure, end. @goatslacker what would you use |
@johanneslumpe There's only one store. |
See @gaearon's comment about composing stores in lieu of |
I'm closing as not a real issue, but I'd be happy to see some middleware outside the core! |
In Flummox we had the ability to auto-dispatch
begin
,success
andfailure
actions. I assume in redux we can do this by creating a custom middleware, which could inspect the type of the action which returned the promise and then dispatched a success or failure action depending on whether the promise gets resolved or rejected. Does this sound correct to you? If so, would it make sense to include something like this as stock middleware in redux?The text was updated successfully, but these errors were encountered: