0👍
✅
Try this.
{
path: '/user/:id',
name: "RouteName",
component: SomeComponent,
props: (route) => {
const id= Number.parseInt(route.params.id, 10)
if (Number.isNaN(id)) {
return 0
}
return { id }
}
}
Source:stackexchange.com