mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
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>
|
||||
```
|
||||
|
||||
```vue {}[pages/child.vue]
|
||||
<script setup lang="ts">
|
||||
const props = defineProps(['foobar'])
|
||||
|
||||
console.log(props.foobar)
|
||||
</script>
|
||||
```
|
||||
|
||||
### 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`:
|
||||
|
Loading…
Reference in New Issue
Block a user