Try to improve Dynamic Slot Names documentation#3038
Open
dtechmaster wants to merge 1 commit intovuejs:mainfrom
Open
Try to improve Dynamic Slot Names documentation#3038dtechmaster wants to merge 1 commit intovuejs:mainfrom
dtechmaster wants to merge 1 commit intovuejs:mainfrom
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. |
NataliaTepluhina
requested changes
Oct 14, 2024
| </ChildComponent> | ||
| </template> | ||
|
|
||
| <script setup> |
Member
There was a problem hiding this comment.
suggestion: we need to wrap this in <div class="composition-api"></div> and write the matching code for Options API
| <script setup> | ||
| import ChildComponent from './ChildComponent.vue'; | ||
|
|
||
| const slotNames = ['header', 'footer']; |
Member
There was a problem hiding this comment.
Same note as above about the Options API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-slotwith 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
:namebinding on the<slot>element.<script setup>and the Composition API to align with modern Vue.js practices.Additional Information