is there a good way to turn an object to be reactive after the vue instance was inited.
I have to call Vue.set recursively to turn an object to be reactive, is there an confortable way?
thx
Hi there, please make sure to read the Issue Reporting Guidelines before opening new issues. The issue list only accepts bug reports and feature requests. Questions should be posted to the Gitter chat room, forum or StackOverflow. Thanks.
vm.$set(key, object) -> object is now reactive
The above did not work for me. however, this one did:
var sharedObject = {/*...*/};
var tmpVm = new Vue({ data : { sharedObject } });
sharedObject = tmpVm.sharedObject;
and in my case, I was running it in a constructor of a class, so:
constructor() {
new Vue({ data: { reactive: this } });
}
Most helpful comment
Hi there, please make sure to read the Issue Reporting Guidelines before opening new issues. The issue list only accepts bug reports and feature requests. Questions should be posted to the Gitter chat room, forum or StackOverflow. Thanks.
vm.$set(key, object)-> object is now reactive