47 ms·
The issue is references, if you de-reference in the data function, you can now never change that reference because Vue's reactivity won't see the change. l
by plopz 7y ago
The issue is references, if you de-reference in the data function, you can now never change that reference because Vue's reactivity won't see the change.
let external = {foo: {bar: 'something'};
new Vue({
data: function() {
return {
ref: external.foo.bar
};
}
})
external.foo = {bar: 'something else'};