-
Notifications
You must be signed in to change notification settings - Fork 85
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
Use component with :is #3774
Use component with :is #3774
Conversation
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.
I really like this refactoring. Regardless of Vue 3 migration, using the dynamic component seems to be much more explicit, especially when :is
is bound not directly but by v-bind="object"
. At the same time, the purpose of the is
special attribute is combability with templates in HTML documents, which is not the case.
However, this approach is used not only in these two components but in many others in a bit less straight way.
What about refactoring all of them?
Binding is
via v-bind="object"
NcListItem
NcAppNavigationItem
NcUserBubble
Direct using is
on a component
NcUserBubble
93c87c1
to
5ea9caa
Compare
Done. |
5ea9caa
to
9bf8ce9
Compare
Signed-off-by: Raimund Schlüßler <[email protected]>
9bf8ce9
to
2813e64
Compare
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.
✨
Vue3 limits the use of the custom elements
:is
special attribute to the reserved<component>
tag only, see https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html#customized-built-in-elementsVue2 does not care. So we migrate already to keep #3692 simpler.