Commit 7e9632d0 authored by Adam Procter's avatar Adam Procter 💩

migrated to Actions

This is best practice to handle mutations.
parent e958036d
......@@ -18,7 +18,7 @@
export default {
methods: {
changed(event) {
this.$store.commit('CHANGE_STATE', event.target.value)
this.$store.dispatch('INCOMING_CHANGE', event.target.value)
},
reset() {
this.$store.commit('CLEAR_STATE')
......
......@@ -14,6 +14,11 @@ export default new Vuex.Store({
this.replaceState({ flavour: null })
}
},
actions: {
INCOMING_CHANGE(_state, event) {
this.commit('CHANGE_STATE', event)
}
},
getters: {
//flavour: state => state.flavour
currentflavour: state => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment