-
Notifications
You must be signed in to change notification settings - Fork 42
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
multiple dispatches inside fetch #43
Comments
@walshe You should try |
example ? |
Had the same problem. @hnq90 just use Promise.all const redial = {
fetch: ({ dispatch }) => Promise.all([
dispatch(fetchCurrentUser()),
dispatch(fetchCategories())
])
} |
So does this mean |
Oh yes, the promise is stated in the doc. Any one having this work with |
Just curious, in your example, if fetchCurrentUser, returns a Promise, do you need special middleware so that |
finally realised after anout 2 weeks that a return is needed on the last dispatch (if you have multiple dispatches) inside the fetch.
Why is this exactly ? might be no harm to put in the docs btw
`const redial = {
/**
this is triggered from server/index.js
*/
fetch: ({ dispatch, params: {filter} }) => {
}
}`
The text was updated successfully, but these errors were encountered: