-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(reactivity): proxyRefs
method and ShallowUnwrapRefs
type
#1682
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { VNode, VNodeChild, isVNode } from './vnode' | ||
import { | ||
reactive, | ||
ReactiveEffect, | ||
pauseTracking, | ||
resetTracking, | ||
shallowReadonly | ||
shallowReadonly, | ||
proxyRefs | ||
} from '@vue/reactivity' | ||
import { | ||
CreateComponentPublicInstance, | ||
|
@@ -561,7 +561,7 @@ export function handleSetupResult( | |
} | ||
// setup returned bindings. | ||
// assuming a render function compiled from template is present. | ||
instance.setupState = reactive(setupResult) | ||
instance.setupState = proxyRefs(setupResult) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yyx990803 is it on purpose that I'd rather have Or going full circle to one of my very first suggestions: not wrapping at all and leaving the responsibility of picking a wrapper to |
||
if (__DEV__) { | ||
exposeSetupStateOnRenderContext(instance) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is better ?