After analyzing the passage below
export default {
methods: {
...mapActions(["updateData", "resetData"]);
}
}
I wanted to include a parameter in the called functions. Unsure of the proper way to do this while still using the ...mapAction()
call, I ended up modifying it to the following.
export default {
methods: {
// ...mapActions(["updateData", "resetData"])
updateData: function() { this.$store.dispatch("updateData", "names") },
resetData: function() { this.$store.dispatch("resetData"); }
}
}
Is this the only solution?