Преглед на файлове

Explain that `mapActions` supports payloads (#652)

Daniel Diekmeier преди 8 години
родител
ревизия
9887d718a2
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      docs/en/actions.md

+ 4 - 1
docs/en/actions.md

@@ -107,7 +107,10 @@ export default {
   // ...
   methods: {
     ...mapActions([
-      'increment' // map this.increment() to this.$store.dispatch('increment')
+      'increment', // map this.increment() to this.$store.dispatch('increment')
+      
+      // mapActions also supports payloads:
+      'incrementBy' // this.incrementBy(amount) maps to this.$store.dispatch('incrementBy', amount)
     ]),
     ...mapActions({
       add: 'increment' // map this.add() to this.$store.dispatch('increment')