I'm using Vuex to manage the states of my app and I'm creating an advance button and a back one, in the case of my progress I use the function below:
addUser() {
const payload = {
name: this.name,
email: this.email
};
this.$store.commit("CHANGE_USER", payload);
}
But I was in doubt on the back button, should I commit an empty variable? Is it possible to go back to a "previous state"? Is this the right way?