Ver código fonte

fix description of dispatch (#421)

katashin 8 anos atrás
pai
commit
39f661659f
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      docs/en/actions.md
  2. 1 1
      docs/en/api.md

+ 1 - 1
docs/en/actions.md

@@ -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: {

+ 1 - 1
docs/en/api.md

@@ -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)`**