In one of the requirements, I need to dynamically add the watch to the same object (in parent component) for different callbacks (belongs to multiple sub components). for example:
addWatch(callback){
this.$watch(()=>{
---
return **this.a**
},callback)
}
I have the following queries:
- With the number of sub components increase, would it cause a performance issue in VUEJS? (IF yes Is there any threshold)
- Would there be any performance improvement if I rather keep an array of callbacks and create watch once to loop through this array and execute each of the methods if watch triggers? Or Does VUEJS manage it internally?
Thanks in advance!