Skip to content
Closed
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
14 changes: 14 additions & 0 deletions docs/guide/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ export default {
}
```

You can pass only one argument to action. If you want to pass more than one argument, use an Array or an Object:

```js
// Action call from component
const user = {
email: this.email,
password: this.password
}
this.login(user)

// Action in Vuex
login({ commit }, { email, password }) {...}
```

## Composing Actions

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?
Expand Down