Skip to content

[Docs] Fix description of dispatch #421

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

Merged
merged 1 commit into from
Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default {

Actions are often asynchronous, so how do we know when an action is done? And more importantly, how can we compose multiple actions together to handle more complex async flows?

The first thing to know is that `store.dispatch` returns the value returned by the triggered action handler, so you can return a Promise in an action:
The first thing to know is that `store.dispatch` can handle Promise returned by the triggered action handler and it also returns Promise:

``` js
actions: {
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const store = new Vuex.Store({ ...options })

- **`dispatch(type: string, payload?: any) | dispatch(action: Object)`**

Dispatch an action. Returns the return value of the triggered action handler, or a Promise if multiple handlers are triggered. [Details](actions.md)
Dispatch an action. Returns a Promise that resolves all triggered action handlers. [Details](actions.md)

- **`replaceState(state: Object)`**

Expand Down