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>

Explanation

The fallback is rendered only if the parent provides no content for that slot.

Further reading

Problem with a question

Vue · Junior · question 66

Test yourself

Take the Vue · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz