I have a Vuex store object which has a mutation.
SET_FILTERS_CATEGORIES(state, payload) {
state.filters.categories = payload;
},
SET_FILTERS_CATEGORIES(state, payload) {
// state.filters.categories = payload; // This "works"
},
This mutation throws me an error:
do not mutate vuex store state outside mutation handlers
If I commented this line it "works". I dont understand what is the problem. It is inside the mutation section.