Skip to content

Commit

Permalink
some more clarifications and small corrections in chapter 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Vannsl committed Oct 15, 2019
1 parent ff7b1d4 commit 30ea1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workshop/full-day/ch4.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ methods: {
```

::: tip 💡
By calling `mapActions` with one parameter, we are defining which actions from our store we want to retrieve. For now we only have `addToFavorites` in this array but in the future we can add more actions as our store grows. You don't always need all actions from your store so by passing on this array to `mapActions` we make sure we only get what we need in thhis comoponent. More information can be found [here](https://vuex.vuejs.org/guide/actions.html#dispatching-actions-in-components).
By calling `mapActions` with one parameter, we are defining which actions from our store we want to retrieve. For now we only have `addToFavorites` in this array but in the future we can add more actions as our store grows. You don't always need all actions from your store in one single component. So by passing on this array to `mapActions` we make sure we only get what we need in thhis component. More information can be found [here](https://vuex.vuejs.org/guide/actions.html#dispatching-actions-in-components).
:::

Now we can dispatch `addToFavorites` like a simple component method.
Expand Down

0 comments on commit 30ea1c5

Please sign in to comment.