From ab8a564a69b4ebd609d81276e2895c2bcb7a2aeb Mon Sep 17 00:00:00 2001 From: Dawid Stefanko <34492112+mitow7821@users.noreply.github.com> Date: Wed, 26 Oct 2022 11:54:19 +0200 Subject: [PATCH 1/3] Update 1.pages.md https://github.com/nuxt/framework/issues/8460 --- docs/content/2.guide/2.directory-structure/1.pages.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/content/2.guide/2.directory-structure/1.pages.md b/docs/content/2.guide/2.directory-structure/1.pages.md index a90ace6d0f9..e6eccb4fc4b 100644 --- a/docs/content/2.guide/2.directory-structure/1.pages.md +++ b/docs/content/2.guide/2.directory-structure/1.pages.md @@ -268,7 +268,9 @@ Of course, you are welcome to define metadata for your own use throughout your a #### `keepalive` -Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)). +Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. + +When your goal is to preserve state for parent routes use this syntax: ``. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)). You can set a default value for this property [in your `nuxt.config`](/api/configuration/nuxt-config#keepalive). From f361bb0fca72c3230c931e59a143d6b2e7e9a776 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 26 Oct 2022 12:15:25 +0200 Subject: [PATCH 2/3] docs: simplify example code --- docs/content/2.guide/2.directory-structure/1.pages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/2.guide/2.directory-structure/1.pages.md b/docs/content/2.guide/2.directory-structure/1.pages.md index e6eccb4fc4b..43f3cb33e51 100644 --- a/docs/content/2.guide/2.directory-structure/1.pages.md +++ b/docs/content/2.guide/2.directory-structure/1.pages.md @@ -270,7 +270,7 @@ Of course, you are welcome to define metadata for your own use throughout your a Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. -When your goal is to preserve state for parent routes use this syntax: ``. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)). +When your goal is to preserve state for parent routes use this syntax: ``. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)). You can set a default value for this property [in your `nuxt.config`](/api/configuration/nuxt-config#keepalive). From 453ccc315485f37d54ffa62c66e87a73bb4abe33 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 26 Oct 2022 12:17:05 +0200 Subject: [PATCH 3/3] docs: remove trailing space --- docs/content/2.guide/2.directory-structure/1.pages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/2.guide/2.directory-structure/1.pages.md b/docs/content/2.guide/2.directory-structure/1.pages.md index 43f3cb33e51..669245b66d3 100644 --- a/docs/content/2.guide/2.directory-structure/1.pages.md +++ b/docs/content/2.guide/2.directory-structure/1.pages.md @@ -268,7 +268,7 @@ Of course, you are welcome to define metadata for your own use throughout your a #### `keepalive` -Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. +Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. When your goal is to preserve state for parent routes use this syntax: ``. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)).