Testing Named Slots
In this lesson, we'll be testing Named Slots.
We'll cover the following
Default Slots
The unnamed slot we used in the previous lesson is called the default slot, but we can have multiple slots by using named slots. Let’s add a header to the MessageList.vue component:
<template><div><header class="list-header"><slot name="header">This is a default header</slot></header><ul class="list-messages"><slot></slot></ul></div></template>
By using <slot name="header"> ...
Get hands-on with 1600+ tech skills courses.