Also worth noting its not 100% true you can't manage your data separately you just need to manage the reactivity yourself.
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.
I find the limitation to only use dumb pojos much worse. AFAIK that is going to be fixed in Vue 3 since the reactivity system will use Proxy instead of getters and setters.
E.g: redux uses a react provider to inject the data into the component tree because of this. Vuex does the same for vue.
React will simply render the object you give it. That means that React doesn’t need to know when data changes, it simply renders the ui, diffs it to the current ui and applys the changes.
Unless your using component state but even then, it’s the rendering that measures change. The act of updating the state just lets React know “time to see if anything important changed”. Vue seems to tra Co data changes granularly which means it needs to understand the change at the point if mutation. This means it needs control of the data you want to render.
let external = {foo: {bar: 'something'};
new Vue({
data: function() {
return {
ref: external.foo.bar
};
}
})
external.foo = {bar: 'something else'};One big issue for me has been that your data layer needs to know about and use Vue, which seems unintuitive as Vue is a UI library.