From 67e69f9871a9317bd228a79e6b0e84df91c15521 Mon Sep 17 00:00:00 2001 From: Alex Liu Date: Wed, 5 Mar 2025 00:16:08 +0800 Subject: [PATCH] docs: clarify lifecycle behavior of `` during page changes (#31116) --- docs/3.api/1.components/2.nuxt-page.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/3.api/1.components/2.nuxt-page.md b/docs/3.api/1.components/2.nuxt-page.md index 6628fed523..14d107fb07 100644 --- a/docs/3.api/1.components/2.nuxt-page.md +++ b/docs/3.api/1.components/2.nuxt-page.md @@ -38,6 +38,10 @@ By default, Nuxt does not enable `` and ``. You can enabl If you enable `` in your page component, ensure that the page has a single root element. :: +Since `` uses `` 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 `` is implemented, the new page component is mounted **before** the previous one is unmounted. + ## Props - `name`: tells `` to render the component with the corresponding name in the matched route record's components option.