3👍
✅
No need for a watch
, here are two ways to make the property reactive:
Option one: Declare the property in your state object:
myObj = { someNumericalId: [] };
Option two: Use Vue.set
to add the property to your object in mutations:
Vue.set(state.myObj, someNumericalId, []);
After this, push
method should automatically trigger updates.
Source:stackexchange.com