...In SPA mode, I don't get the vid param as a prop and in SSR mode, I have to patch to.meta.state as shown below to get vid param injected into the component as a prop.
router.beforeEach((to, from, next) => {
if (to.meta.state) {
return next()
}
// pass route params to the page as props
to.meta.state = Object.assign(
{},
to.meta.state,
initialState,
initialRoute.params,
)
next()
})
Say I define my routes as follows:
...In SPA mode, I don't get the
vid
param as a prop and in SSR mode, I have to patchto.meta.state
as shown below to getvid
param injected into the component as a prop.I guess I'm not doing something right