DocsChoose
Rendering
Nexy renders a page on the server by default and hydrates the interactive parts in the browser.
Not sure? Keep the default, SSR. Change a page only when you can name the reason: content that rarely changes (ISR), one widget that needs the browser (island), or app-like navigation (CSR).
SSR request ──► server renders ──► HTML ──► browser
ISR request ──► cache hit? ──► HTML ──► browser, regenerated in the background
CSR request ──► empty shell ──► browser renders the page
Islands request ──► server renders ──► HTML ──► one widget hydrates on demand
| Mode | Where the HTML comes from | Enabled by |
|---|---|---|
| SSR | the server, on every request | default |
| ISR | the server, cached with stale-while-revalidate | revalidate = N in a .nexy page |
| CSR | the browser, after the first load | useCSR = True in nexyconfig.py |
| Islands | the server, hydrated on demand | directive prop on a client component |
Which one
- Content and marketing pages: SSR, plus ISR when the content changes rarely.
- Mostly static page with one interactive widget: SSR with an island that hydrates when visible.
- App-like navigation (dashboards, editors): CSR with React, Vue, Svelte, Solid or Preact routes.
Server rendering, ISR and islands belong to server mode, where layout.nexy owns the HTML
document. CSR is client mode, where the root layout.tsx does. A project is in one mode: see
Server mode and client mode and
Layouts.