You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
consider about Ref as props when using mount api #192
What happens if you attempt to put a ref inside reactive in VTU at the moment? Something weird?
Btw, what is your real-world use case (assuming there is one) for passing a ref as a prop? I am guessing this is supported in Vue 3.x (never thought about it).
I do believe we need props to be reactive for the setProps function.
I think passing a template ref is actually going to be a use-case people. I wonder if we can use isRef to check for a ref then use markRaw or something like that to opt-out.
I will think about this a bit more and try some things out, lmk if you come up with anything 👍
Activity
lmiller1990 commentedon Aug 31, 2020
What happens if you attempt to put a
refinsidereactivein VTU at the moment? Something weird?Btw, what is your real-world use case (assuming there is one) for passing a ref as a prop? I am guessing this is supported in Vue 3.x (never thought about it).
I do believe we need
propsto be reactive for thesetPropsfunction.Jokcy commentedon Sep 1, 2020
I'm not sure if my case will be a common case. Since I write my components using composition api
this code not work anymore because I did not put the
doSomethingmethod onvm. So I figure out and try to use:and it worked.
This breaks when using
mount(App, { props: { contextRef } }), I did not find the reason by now and I am also not sure whether this need to be fixed.lmiller1990 commentedon Sep 2, 2020
I think passing a template ref is actually going to be a use-case people. I wonder if we can use
isRefto check for arefthen usemarkRawor something like that to opt-out.I will think about this a bit more and try some things out, lmk if you come up with anything 👍