As Vuex, I\'m trying to update an object using form. My code like this.
In store:
const state = { categories: [] }; //mutations: [mutationType.UP
You just need one line code because the javascript object has reference capabilities
//mutations: [mutationType.UPDATE_CATEGORY] (state, id, category) { Object.assign(state.categories.find(element => element.id === id), category); }