Subscribe on changes!

toRef results

avatar
Aug 21st 2022

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNptU8tu2zAQ/JUFL5EDxUKuju2gxyCHAkHQS9gDLa1iORLJ8uE0MPTvHVKy2wbxwdByZ4a7w92T+Gbt8hhZrMTa166zgTyHaLdSd4M1LtCJHLelY1WH7shlME/c0kitMwNdgXkltdS10T7Q4F9pk+BFcJEXUhNJXVUUzCRKKiWpA1bpms+0wD48BB5m7u3i7mvmVMGX9O+7Q2ZPkOKUBM6ypdRjkoTg9XVK8O/cWBs10EbjErS0fsZ5YN14MrsD16Gkx8vJG3+Ylp63RaLTDFjRM6RTjPSKHueg4VbFPvxQfeR7YF4ef6bEAp/TPTjYEiqc4KnJPdOviGpTMdnXPTsu8/lR9fRuYt+Q5iM72vEnEyeYdaZmj9JbeuWQWXvlKWqr6jdu5tK8AdWyCtxQDbPyhaD8q+epMfjTJpBqW7RJAw/GfVAyOw42cc61T/6nyzazJy+wIrdLEA3Raeo8mi6AyeOQfveJcQ5WVGh+J7wf2EA+DLYvzg8AsfI/PxeEppT+yFqj1NfVNCl/B+GJPcAeBeVXLebhKEmK8zxIMU0DpnWJSiIDnHEX7gbsGby4wwu1qvcYt3U1bQh2AwGStoeViIjW+9vt6ZQXYBzXFaJ82mkbYdDNYBruN1IgLwVS6+rCFqWYFu1mUHZ58EZjFfP8yjnhpVileUl2SYGNS7EU+xCsX1WVb+u0wAe/NO61wtfSRR26gZfsh5udM++eHYSlmE0bxfgHsi5bCg==

Steps to reproduce

What is expected?

the msg result is true

What is actually happening?

the msg result is false

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 14.60 GB / 31.73 GB
  Binaries:
    Node: 16.15.1 - E:\devTools\forNode\node.EXE
    npm: 8.11.0 - E:\devTools\forNode\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (104.0.1293.54)
    Internet Explorer: 11.0.22000.120

Any additional comments?

no more

avatar
Aug 21st 2022

This is expected. toRefs creates a new refs for all properties, regardless of their (raw) content. It will not give the same ref potentially nested inside the reactive() proxy's raw target object.