Skip to main content
Island pages are for mostly static documents with a few interactive widgets.

Island pages

Name the page with .island.tsx:
The page is rendered to HTML. better-router does not start the SPA router on that page.

Marking islands

Use an import attribute. The value is the hydration strategy:
src/routes/blog/index.island.tsx
You can also wrap a component:

Strategies

TypeScript needs "module": "ESNext" for import attributes. See TypeScript.

Forms and navigation

Island pages do not run the SPA router. <Link> to a non-island page does a full load. Use useIslandForm instead of useForm — a successful action reloads the document.