Skip to content

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

Merged
danielroe merged 1 commit intonuxt:mainfrom
Mini-ghost:feature/support-nuxt-page-slot
May 3, 2024
Merged

feat(nuxt): make <NuxtPage> exposes default slots#27050
danielroe merged 1 commit intonuxt:mainfrom
Mini-ghost:feature/support-nuxt-page-slot

Conversation

@Mini-ghost
Copy link
Copy Markdown
Member

🔗 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.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

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