@nuxt/docs-nightly 5.0.0-29636201.7c062df4 → 5.0.0-29636459.0c41bc40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -539,6 +539,12 @@ This means:
|
|
|
539
539
|
Route middleware does not run when rendering island components. Middleware is a routing concept that applies to pages, not components, and is not designed to control component rendering.
|
|
540
540
|
::
|
|
541
541
|
|
|
542
|
+
::important
|
|
543
|
+
`useRoute()` and other `vue-router` composables do not track the current page route inside a server (island) component. The island is rendered in its own isolated Vue app keyed only on its props (and any explicit context), which is what keeps islands cacheable independently of the page they are rendered on. Inside an island, `useRoute()` will reflect the island's own request, not the page the user is on.
|
|
544
|
+
|
|
545
|
+
If an island needs information about the current route, pass it in explicitly — either as props from the parent component, or via the `context` prop on `<NuxtIsland>` (read inside the island from `nuxtApp.ssrContext.islandContext`).
|
|
546
|
+
::
|
|
547
|
+
|
|
542
548
|
Within an island component, you can access its island context through `nuxtApp.ssrContext.islandContext`. Note that while island components are still marked as experimental, the format of this context may change.
|
|
543
549
|
|
|
544
550
|
::note
|