Closed
Description
Vue version
@a95e612 (current commit after 3.3.4)
Link to minimal reproduction
Steps to reproduce
Open the example. In the console you see the message printed twice but once you see the internal ref printed.
The issue only shows itself when using "set" on a shallow Reactive map (foo2)
If you initialize the map with the same value, it is correct (foo1)
What is expected?
The behavior should be consistent.
Either the shallowReactive map should ALWAYS resolves the ref or never.
Imo, the reactive object in the shallowReactive should behave as normal. Hence, in my example, it should always resolve the ref correctly (because thats what the reactive is for)
What is actually happening?
The behavior is inconsistent depending on if the map is initialized with the value or later set
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 PRO 6850HS with Radeon Graphics
Memory: 10.51 GB / 15.28 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 19.8.1 - ~/.nvm/versions/node/v19.8.1/bin/node
Yarn: 3.3.0 - /usr/bin/yarn
npm: 8.19.4 - ~/repos/packmatic/node_modules/.bin/npm
Browsers:
Chrome: 114.0.5735.90
Any additional comments?
I am aware that you shouldnt have reactive objects in shallowReactive ones :D