Subscribe on changes!

why deep property change will trigger a shallowReactive object`s denpendencies?

avatar
Dec 18th 2020

Version

3.0.4

Reproduction link

https://jsfiddle.net/rxpcL210/1/

Steps to reproduce

const origin = { a: {b: 2}}; const reactiveProxy = reactive(origin); const shallowProxy = shallowReactive(origin); watchEffect(() => { console.log('shallow', shallowProxy.a.b) }) watchEffect(() => { console.log('reactive', reactiveProxy.a.b) }) window.s = shallowProxy s.a.b

What is expected?

s.a.b change do not trigger dependencies

What is actually happening?

s.a.b change trigger dependencies

avatar
Dec 18th 2020

tracked in #2843