0๐
โ
I figured it out. I need to create a new Object when mutating the state:
// mutations
const mutations = {
[types.CHANGE_PAGE] (state, {key, value}) {
state[key] = Object.assign({}, state[key], value);
},
[types.CHANGE_PER_PAGE] (state, {key, value}) {
state[key] = Object.assign({}, state[key], value);
},
};
Source:stackexchange.com