I have the following structure in my App.vue file:
<script setup>
import { RouterView } from "vue-router";
</script>
<template>
<RouterView v-slot="{ Component }">
<transition :name="fade" mode="out-in">
<component :is="Component" />
</transition>
</RouterView>
</template>
Along with the router configuration shown below:
import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "signin",
component: () => import("../views/signin.vue"),
},
{
path: "/dashboard",
name: "dashboard",
component: () => import("../views/dashboard.vue"),
},
],
});
export default router;
Despite setting up everything correctly, when I navigate through the links in my application, there is no transition effect happening. Even commands like
$router.push("/dashboard");
or router-link(to="/dashboard", active-class="active")
do not trigger any transitions. I've looked through various resources and tutorials but couldn't figure out why the transitions are not working. Any insights on what might be causing this issue?