[Vuejs]-Nuxt increment button using a mutation/action

0👍

Depending on the name of your file under the "store" folder, you would commit or dispatch with a prefix matching the filename. For example, if your file was set as "store/commerce.js", your commits and dispatches would look like this.$store.dispatch("commerce/clearCart").

I would suggest looking into the mapMutations helper as well, since that can save you some cycles.

Leave a comment