Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nuxt): make <NuxtPage> exposes default slots #27050

Merged
merged 1 commit into from May 3, 2024

Conversation

Mini-ghost
Copy link
Contributor

馃敆 Linked issue

Resolve #26998

馃摎 Description

After this PR, we can use <NuxtPage> more like <RouterView> like bellow:

<NuxtPage v-slot="{ Component: component }">
  <Component :is="component" />
</NuxtPage>

The code above is equivalent to using <NuxtPage /> without the slot, but the slot provides extra flexibility when we want to work with other features.

Copy link

stackblitz bot commented May 3, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe merged commit 4779f59 into nuxt:main May 3, 2024
57 checks passed
@github-actions github-actions bot mentioned this pull request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RouterView slot
2 participants