-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.2.26
Reproduction link
Steps to reproduce
Documentation https://v3.vuejs.org/api/basic-reactivity.html#toraw says that toRaw
can be used as an "escape hatch" from Vue reactivity.
It's not, apparently
Examples:
toRaw(ref('aValue'))
gives a ref object instead of 'aValue' stringtoRaw({a: 'a', b: ref('b'), c: ['ca', ref('cb')]})
gives an object, keeping all the inner refstoRaw(reactive({a: 'a', b: ref('b'), c: ['ca', ref('cb')]}))
gives an object, keeping all the inner refs
What is expected?
I expect toRaw
results in a value completely free from Vue reactivity and all the inner refs be unwrapped.
What is actually happening?
toRaw
doesn't unwrap inner refs, hence the result is not completely free from Vue reactivity and ref values need to be accessed using .value
Metadata
Metadata
Assignees
Labels
No labels