4 ms·
yep. thats intentional... you can have multiple instances of vue going and it also plays nice with jQuery so that you can add Vue into your project without mess
by jppope 7y ago
yep. thats intentional... you can have multiple instances of vue going and it also plays nice with jQuery so that you can add Vue into your project without messing everything up.
Also worth noting its not 100% true you can't manage your data separately you just need to manage the reactivity yourself.
- plopz 7y agoDo you mean writing your own get/set observables? I've looked at how Vuex does it and internally it just wraps the data in a Vue instance. https://github.com/vuejs/vuex/blob/dev/src/store.js#L280 https://github.com/vuejs/vuex/blob/dev/src/store.js#L280
- iovrthoughtthis 7y agoI don’t understand how (or why) managing the reactivity of data and having multiple instances are coupled. Also, implementing your own reactivity is very unintuitive. You need to implement your own “diffing” (is this change worth rendering) to know when to force Vue to render. This is definitely not how Vue was intended to be used.