mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-19 07:51:18 +00:00
docs: clarify lifecycle behavior of <NuxtPage>
during page changes (#31116)
This commit is contained in:
parent
a243f8fcf6
commit
67e69f9871
@ -38,6 +38,10 @@ By default, Nuxt does not enable `<Transition>` and `<KeepAlive>`. You can enabl
|
||||
If you enable `<Transition>` in your page component, ensure that the page has a single root element.
|
||||
::
|
||||
|
||||
Since `<NuxtPage>` uses `<Suspense>` under the hood, the component lifecycle behavior during page changes differs from that of a typical Vue application.
|
||||
|
||||
In a typical Vue application, a new page component is mounted **only after** the previous one has been fully unmounted. However, in Nuxt, due to how Vue `<Suspense>` is implemented, the new page component is mounted **before** the previous one is unmounted.
|
||||
|
||||
## Props
|
||||
|
||||
- `name`: tells `<RouterView>` to render the component with the corresponding name in the matched route record's components option.
|
||||
|
Loading…
Reference in New Issue
Block a user