From 8a33d06c7d8d37cdcf1dc96c43c572f49e376632 Mon Sep 17 00:00:00 2001 From: ktsn Date: Mon, 24 Oct 2016 23:52:38 +0900 Subject: [PATCH] fix description of dispatch --- docs/en/actions.md | 2 +- docs/en/api.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/actions.md b/docs/en/actions.md index b5e9a2ebe..fa0156150 100644 --- a/docs/en/actions.md +++ b/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: { diff --git a/docs/en/api.md b/docs/en/api.md index 60efd0ab2..428980f73 100644 --- a/docs/en/api.md +++ b/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)`**