Skip to content

Commit

Permalink
docs: suggest using <NuxtPage> rather than <RouterView> (#25106)
Browse files Browse the repository at this point in the history
  • Loading branch information
toto6038 committed Jan 9, 2024
1 parent 3d368c9 commit 4168157
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/3.api/1.components/2.nuxt-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ links:
It accepts same `name` and `route` props.
::

::callout{color="amber" icon="i-ph-warning-duotone"}
`<NuxtPage>` should be used instead of `<RouterView>` as the former takes additional care on internal states. Otherwise, `useRoute()` may return incorrect paths.
::

## Props

- `name`: tells `RouterView` to render the component with the corresponding name in the matched route record's components option.
Expand Down

0 comments on commit 4168157

Please sign in to comment.