-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Reproduction
https://github.com/jakedohm/router-link-slot-bug-reproduction
Expectation
When I use the v-slot API on a router-link, I'm able to use the isActive property to set classes on the link, like so:
<router-link
v-slot="{ isActive }"
:class="[isActive ? 'bg-red' : 'bg-blue']"
active-class="underline"
to="/"
>Home</router-link
>
What's really happening
The isActive property doesn't appear to be set on initial render, causing the bg-blue
class to always be set, even if that link is active. Vue throws this warning:
kleinfreund
Metadata
Metadata
Assignees
Labels
No labels