How to access props in "extended" component #8264
Unanswered
incutonez
asked this question in
Help/Questions
Replies: 1 comment
-
See vuejs/rfcs#477. Discussion is welcome. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's say I have 2 components:
CompBase
andCompExt
. CompExt is basically a "pass-through"/extended component of CompBase, where its props are the same as CompBase. However, in CompExt, I need to access the props to do some additional logic. e.g. this exampleI can obviously redefine the props, but then I'd have to add a
v-bind="$props"
in the template, which feels wrong. e.g. this exampleI could also try accessing
useAttrs
, but then the props aren't formally processed yet...isUpdate: true
would come in asis-update: ""
, and obviously I don't have proper typing or auto completion in my IDE.So what would be the "proper" way to do what I'm trying to do?
Beta Was this translation helpful? Give feedback.
All reactions