Skip to content

Commit 9887d71

Browse files
danieldiekmeierktsn
authored andcommitted
Explain that mapActions supports payloads (#652)
1 parent ca965cd commit 9887d71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/en/actions.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ export default {
107107
// ...
108108
methods: {
109109
...mapActions([
110-
'increment' // map this.increment() to this.$store.dispatch('increment')
110+
'increment', // map this.increment() to this.$store.dispatch('increment')
111+
112+
// mapActions also supports payloads:
113+
'incrementBy' // this.incrementBy(amount) maps to this.$store.dispatch('incrementBy', amount)
111114
]),
112115
...mapActions({
113116
add: 'increment' // map this.add() to this.$store.dispatch('increment')

0 commit comments

Comments
 (0)