mirror of https://github.com/nuxt/nuxt.git
docs: provide example of passing props to a child page (#26805)
This commit is contained in:
parent
bde696a0db
commit
8feb5fe5a4
|
@ -193,6 +193,14 @@ To display the `child.vue` component, you have to insert the `<NuxtPage>` compon
|
||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```vue {}[pages/child.vue]
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps(['foobar'])
|
||||||
|
|
||||||
|
console.log(props.foobar)
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
### Child Route Keys
|
### Child Route Keys
|
||||||
|
|
||||||
If you want more control over when the `<NuxtPage>` component is re-rendered (for example, for transitions), you can either pass a string or function via the `pageKey` prop, or you can define a `key` value via `definePageMeta`:
|
If you want more control over when the `<NuxtPage>` component is re-rendered (for example, for transitions), you can either pass a string or function via the `pageKey` prop, or you can define a `key` value via `definePageMeta`:
|
||||||
|
|
Loading…
Reference in New Issue