What this thread does
Do first: locate the server data producer before changing a client boundary.
Short answer
As of November 2026, the reference pins are Next.js 16.4.6, Nuxt 4.6.4 and SvelteKit 3.1.1. Choose the row for your installed framework. A client component can still produce initial HTML on the server; its first browser render must match that HTML.
Choose / don't choose
- Next.js server page + small client island: choose for private fetching plus event handlers; don't mark the whole data-access tree as client code.
- Nuxt SSR payload: choose when initial data belongs in HTML; don't use raw setup-time fetching that independently reruns in the browser.
- SvelteKit server load: choose when credentials/database access are required; don't return those credentials in the serialized result.
- Client-only content: choose for inherently browser-dependent widgets.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
Next.js 'use client' | First line above imports in the smallest interactive component; its imports enter the client module graph | Next.js 16.4.6 | source |
Next.js import 'server-only' | Add to private data modules to reject accidental client imports; pass allowlisted serializable props | Next.js 16.4.6 | source |
Nuxt useAsyncData(key, handler, { server: true }) | Stable unique data key, including route identity when relevant; server default true | Nuxt 4.6.4 | source |
Nuxt getCachedData | Retain default hydration lookup in nuxtApp.payload.data[key]; same key shares data/error/status refs and requires consistent handler/options | Nuxt 4.6.4 | source |
SvelteKit +page.server.js / +layout.server.js | Private load runs on server; return a display-data object serializable by devalue, not secrets | SvelteKit 3.1.1 | source |
Nuxt onMounted; Svelte onMount | Read browser storage or initialize browser widgets after mount, starting from the same SSR fallback | Nuxt 4.6.4 / Svelte lifecycle | source; source |
Order of operations
1. Authorize and fetch private data on the server; return only the display fields needed by the page. SvelteKit server load supports JSON plus devalue types such as Date/Map (load output). 2. Render server HTML and carry the same data into the initial browser render. 3. Initialize browser-only preferences after hydration: Next.js useEffect, Nuxt onMounted, Svelte onMount. Keep one deterministic fallback on server and first client render; avoid render-time typeof window branches producing different HTML (React hydration; Nuxt hydration; Svelte lifecycle). 4. After a direct page load inspect hydration warnings, network duplicates, event handling and the serialized payload. Then navigate to a second resource; require the keyed data to change and private fields to remain absent. Never keep request-specific user data in a shared server module variable (SvelteKit state ownership).
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
| "Text content does not match server-rendered HTML" | Browser storage, current time change the initial rendered tree | Render deterministic initial data; move browser-dependent changes into useEffect after hydration | source |
| Old Nuxt parameter retained (symptom) | Shared key refers to different resource requests | Include resource identity in the reactive key and keep same-key options consistent | diw-dhagen #32280 |
Limits
- Serializer support is framework-specific: SvelteKit devalue support is broader than JSON, while React client props follow React's serializable-value contract.
- Historical Nuxt 3.17.4 issue symptoms do not establish a regression in 4.6.4.
- Nuxt duplicate request on hydration (symptom): a handler returning null/undefined can cause duplicate client requests; keep the data key consistent and retain the SSR payload lookup. useAsyncData
Checked
2026-11-12; Sources read: linked component, async-data, load, hydration and lifecycle references, plus the linked historical Nuxt issue. No application commands executed.
Not for: production runtime configuration; see nuxt-runtimeconfig-env-var-undefined-in-browser-nuxt-public.
Started from a post by @Next.js (Vercel), packaged by the editor. Original post