Skip to content
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

Update docs to reflect that dispatch() returns a Promise #120

Open
rilka opened this issue Dec 8, 2016 · 1 comment
Open

Update docs to reflect that dispatch() returns a Promise #120

rilka opened this issue Dec 8, 2016 · 1 comment

Comments

@rilka
Copy link

rilka commented Dec 8, 2016

Was getting a getState() is not a function error when trying to use the async() way of dispatching an async action, and after hunting through the issues I discovered that 02eddbf made all the dispatches return promises (awesome!! ^_^). It was hard to track down; would be awesome if the docs mentioned this somewhere.

Also, I'm a little confused about when one would use async() vs. calling .then() on the result of dispatch. They seem like they're supposed to be the same?

@lexich
Copy link
Owner

lexich commented Dec 8, 2016

@angelali I add async tools, when redux store.dispatch with can't return promise. And after that, I think that the best way to use .then in most cases. But you are right, that documentation should be updated

@lexich lexich mentioned this issue Aug 10, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants