How to pass props to a page?
Hi,
I'm migrating my vue app to Nuxt and facing an issue with my page component using a prop. I I've seen the exact same question on stackoverflow, however it wasn't answered for Nuxt3.
https://stackoverflow.com/questions/60443520/how-to-pass-props-to-a-page-in-nuxt
Thats the page component:
I want to avoid using the route.params solution (bad practice). Are there any other possibilities?
I'm migrating my vue app to Nuxt and facing an issue with my page component using a prop. I I've seen the exact same question on stackoverflow, however it wasn't answered for Nuxt3.
https://stackoverflow.com/questions/60443520/how-to-pass-props-to-a-page-in-nuxt
Thats the page component:
I want to avoid using the route.params solution (bad practice). Are there any other possibilities?
Stack Overflow
All I'm trying to do is pass a parameter to a page in Nuxt. In Vue, it's easy:
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
or
<router-link to="/...
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
or
<router-link to="/...