Answer the question
In order to leave comments, you need to log in
How to change values in state vuex correctly?
Vue.js application using Vuex.
Vuex store is like this:
state: {
step: 'start',
},
mutations: {
toggleStep(commit, value) {
this.state.step = value;
},
},
actions: {},
<a href='#' @click.prevent='nextStep'>Следующий шаг</a>
nextStep() {
this.$store.commit('toggle', 'login');
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question