-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
What problem does this feature solve?
toRaw()
allow for an "escape hatch" to access the raw value of reactive
proxy , however there is no equivalent support for other "reactive" objects such as ref
or computed
.
ref and reactive are already mingled internally
let refThatActuallyWrapsReactiveObject = ref({a:1})
supporting a common way to access raw values of any of the supported *reactive envelopes types will improve the framework abilities to work with reactive objects and allow for greater control for developers.
What does the proposed API look like?
toRaw(obj: Reactive|Ref|Computed|... )
ref should be straight forward implementation
isRef(obj) {
return obj._rawValue
}
computed
is lazily evaluated, and toRaw should probably be as transparent as possible and should not trigger any effects or possibly the evaluation of the getter.
Metadata
Metadata
Assignees
Labels
No labels