I've the following 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>
And the following router file:
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;
When I run my application and click any link, no transition is happening, no matter if it use $router.push("/dashboard");
or router-link(to="/dashboard" active-class="active")
. I've already checked out many other questions and tutorials but unfortunately it's still not working. Any idea why no transition happens?