Skip to content

Commit 39f6616

Browse files
ktsnyyx990803
authored andcommitted
fix description of dispatch (#421)
1 parent eaf53da commit 39f6616

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/en/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default {
120120

121121
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?
122122

123-
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:
123+
The first thing to know is that `store.dispatch` can handle Promise returned by the triggered action handler and it also returns Promise:
124124

125125
``` js
126126
actions: {

docs/en/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const store = new Vuex.Store({ ...options })
121121
122122
- **`dispatch(type: string, payload?: any) | dispatch(action: Object)`**
123123
124-
Dispatch an action. Returns the return value of the triggered action handler, or a Promise if multiple handlers are triggered. [Details](actions.md)
124+
Dispatch an action. Returns a Promise that resolves all triggered action handlers. [Details](actions.md)
125125
126126
- **`replaceState(state: Object)`**
127127

0 commit comments

Comments
 (0)