Vue · Junior · Question 66 of 75
How do you show default content when the parent passes nothing to a slot?
<button><slot>Submit</slot></button>- ✓Correct answer: Put fallback content inside
<slot> - 2Use
v-if="!$slots"on the button - 3Slots can't have defaults
Explanation
The fallback is rendered only if the parent provides no content for that slot.