Nuxt 2 reached end of life on 30 June 2024
It no longer receives bug fixes or security patches. Upgrade to Nuxt 4 or get extended support from HeroDevs
The key Property
Set the key property of internal <router-view> component
- Type:
StringorFunction
The key property is propagated into <router-view>, which is useful to make transitions inside a dynamic page and different route. Different keys result in re-rendering of page components.
There are several ways to set the key. For more details, please refer to the nuxtChildKey prop in the nuxt component.
export default {
key(route) {
return route.fullPath
}
}Was this helpful?