[Vuejs]-Mutation not updating data in Vuex

0👍

Because the new property of eachCategoryItems is not reactive, so you need the Vue set

     if(!state.eachCategoryItems[item.CATEGORY])
          Vue.set(state.eachCategoryItems, item.CATEGORY, [item]);
        else
          state.eachCategoryItems[item.CATEGORY].push(item);

Leave a comment