4π
Yes with Vue.set
. However, itβs only needed when adding a new property to an object, not when updating an already reactive property.
See https://v2.vuejs.org/v2/guide/reactivity.html#Change-Detection-Caveats for more information:
Change Detection Caveats
Due to the limitations of modern JavaScript (and the abandonment of
Object.observe
), Vue cannot detect property addition or deletion.
Since Vue performs the getter/setter conversion process during
instance initialization, a property must be present in the data object
in order for Vue to convert it and make it reactive.Vue does not allow dynamically adding new root-level reactive
properties to an already created instance. However, itβs possible to
add reactive properties to a nested object using theVue.set(object, key, value)
method.