-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Try to improve Dynamic Slot Names documentation #3038
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
Conversation
Propose explanation on how to declare Dynamic Slot Names and not only on how to use them.
✅ Deploy Preview for vuejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
suggestion: we need to wrap this in <div class="composition-api"></div>
and write the matching code for Options API
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.
Same note as above about the Options API
Sure! Here's a suggested pull request message that you can use:
Title: Improve Documentation for Dynamic Slot Names by Adding Declaration Examples
Description:
This pull request enhances the Dynamic Slot Names section of the Vue.js documentation by providing explanations and examples on how to declare dynamic slots in child components, not just how to use them in parent components.
Description of Problem
The current documentation for Dynamic Slot Names focuses primarily on how to use dynamic slot names in the parent component using
v-slot
with dynamic arguments. It lacks information on how to declare dynamic slots in the child component. This omission can lead to confusion, as understanding both declaration and usage is essential for implementing dynamic slots effectively.Proposed Solution
:name
binding on the<slot>
element.<script setup>
and the Composition API to align with modern Vue.js practices.Additional Information