-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Open
Labels
Description
Vue version
3.4.35
Link to minimal reproduction
Steps to reproduce
PR #11442 is not just a TS>5.1 issue; it also requires additional testing for nested Ref arrays.
What is expected?
a.value.b = 1; // OK
a.value.c[0] = 2; // OK
What is actually happening?
a.value.b = 1; // OK
a.value.c[0] = 2; // TS Error 2322
System Info
System:
OS: macOS 13.6.7
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 24.11 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvs/node/20.16.0/x64/bin/node
Yarn: 1.22.22 - ~/.nvs/node/20.16.0/x64/bin/yarn
npm: 10.8.2 - ~/.nvs/node/20.16.0/x64/bin/npm
pnpm: 9.6.0 - ~/.nvs/node/20.16.0/x64/bin/pnpm
Browsers:
Chrome: 127.0.6533.90
Safari: 17.5
Any additional comments?
https://vuejs.org/api/reactivity-core.html#ref
If an object is assigned as a ref's value, the object is made deeply reactive with reactive(). This also means if the object contains nested refs, they will be deeply unwrapped.