I'm using Vue3 CDN on top of a Django project where I added VueRouter and it worked perfectly fine until I decided to add name to the route objects.
Inside of my main component, I'm trying here to check the value of the route name each time the user visite a page.
const routes = [
{
path: '/',
name: 'home',
component: home
},
{
path: '/our-program'
name: 'program',
component: 'program'
}
]
const router = VueRouter.createRouter({
history: VueRouter.createWebHashHistory(),
// mode: history,
routes,});
const app = Vue.createApp({
data() {
return {}
},
computed:{
isFocus(){
return this.$route.name;
}
},
mounted() {
console.log(this.$route);
},
});
const vm = app.use(router).mount('#pages');
I get the path in the console but the $route.name doesn't seem to get through.
Does't anyone know what I've been doing wrong ? 
this.$route.name can be displayed from the child component not from the actual root component as I was trying to do.