When attempting to pass data through slots, I encounter an error message:
'Named slots must use '' on a custom element.'
Please find my code below for reference.
<template>
<div>
<h3>Home</h3>
<User v-slot:user="{ user }">
<template>
<div v-if="user">
<p>Logged-in as {{user.uid}} </p>
<!-- PASS USER STATE AS PROP -->
<UserProfile :user="user"/>
<ChatList :uid="user.uid"/>
</div>
<Login v-else/>
</template>
</User>
</div>
</template>
The line causing the error is as follows:
<User v-slot:user="{ user }">