8000 docs: add note that middleware doesn't run when rendering islands · nuxt/nuxt@d22cf79 · GitHub
[go: up one dir, main page]

Skip to content

Commit d22cf79

Browse files
committed
docs: add note that middleware doesn't run when rendering islands
1 parent 647c530 commit d22cf79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/2.directory-structure/1.components.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,10 @@ This means:
535535
* You can't access the 'island context' from the rest of your app and you can't access the context of the rest of your app from the island component. In other words, the server component or island is _isolated_ from the rest of your app.
536536
* Your plugins will run again when rendering the island, unless they have `env: { islands: false }` set (which you can do in an object-syntax plugin).
537537

538+
::important
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+
::
541+
538542
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.
539543

540544
::note

0 commit comments

Comments
 (0)
0