published fresh until

Nuxt: fix a slow or hydration-mismatching page

Summary Record the affected route, distinguish server wait from navigation and browser work, then change the matching route or component on Nuxt 4.6.2

Not for Next.js App Router hydration errors; see nextjs-hydration-failed-error-which-cause-and-fix

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Record the affected route's loading and hydration behavior, then change the route, request or component that accounts for the delay.

Do first: classify one route

As of November 2026, the baseline here is Nuxt 4.6.2, released 2026-10-16. Keep the installed version fixed while diagnosing. Release notes

Use browser DevTools → Performance to record a reload and a NuxtLink navigation, keeping Network and Console visible. Classify document wait, API wait, payload transfer, JavaScript work or changing HTML. Compare equivalent builds and network conditions. Nuxt 4.6.2 profiling guide

Choose the matching branch

1. The document response is slow, and the page is public and static → prerender that route

As of November 2026, Nuxt 4.6.2: follow Hybrid Rendering. Set routeRules: { '/about': { prerender: true } } in nuxt.config.ts. Rebuild and deploy; confirm the output includes /about and compare document response time. Use this only for public content that can wait until the next build to change.

2. Clicking a link waits for data before showing the page → make that request non-blocking

As of November 2026, Nuxt 4.6.2: the useFetch options expose lazy: true. For optional data, use:

<script setup lang="ts">
const { data, status, error } = await useFetch('/api/recommendations', {
  lazy: true,
})
</script>

Render a loading state while status === 'pending', an error state when error exists, and guard the data view until data exists. Throttle the API response and navigate again: the page shell should appear before recommendations arrive. This changes client navigation; SSR still waits for server fetching. If the symptom is duplicate server/client requests, see nuxt-data-fetched-twice-usefetch-or-useasyncdata-instead-of-fetch-in-setup.

3. HTML or hydration data is oversized → return fewer fields

As of November 2026, Nuxt 4.6.2: follow useAsyncData's pick/transform options. For a response object containing title and description, use await useAsyncData('product', () => $fetch('/api/product'), { pick: ['title', 'description'] }); use transform to reshape nested results. Compare transferred document/payload bytes and confirm every rendered field still exists after reload and client navigation. This trims serialized data, not the upstream API response itself.

Keep the default serialization for data required by the client. In this version, serialize: false can cause a client refetch when a component renders the data; it is not a blanket payload fix. Serialization behavior

4. The document is quick but an offscreen component blocks interactivity → delay its hydration

As of November 2026, Nuxt 4.6.2: follow Lazy Hydration. Render an auto-registered component as <LazyProductReviews hydrate-on-visible />. Compare initial work, then scroll it into view and exercise its controls. Visibility triggers hydration, so keep it offscreen during the first measurement. Vue's hydration strategy

5. The first HTML changes or the console warns → repair server/client agreement

As of November 2026, Nuxt 4.6.2: start with the official hydration guide, alongside the 4.6.2 performance guidance. Reduce the first mismatching component. Compare its server-rendered text and structure with its first client render.

For random initial state, use a stable keyed initializer such as useState('hero-choice', () => Math.random()). For a browser library that mutates the DOM, move its initialization into onMounted; ensure both initial renders show the same fallback. Reload with the same cookies, then navigate away and back: the initial content should stay consistent and the warning should disappear without suppressing it. For dates, invalid HTML and the detailed mismatch cases, see vue-nuxt-hydration-mismatch-ssr-random-dates-invalid-html.

Evidence and limits

Independent report: dusta, Nuxt issue #34399, opened 2026-02-27, describes oversized serialized data and content being replaced after hydration. On 2026-03-02, Daniel Roe recommended transform and lazy hydration. That report motivates inspecting payload and render agreement; it does not establish a latency improvement for every project.

felek000's 2026-01-12 report also describes pre/post-hydration differences with mixed route rules and fetching. It is an unresolved report, not a universal fix. Confirm the cause in your own route before changing rendering mode.

These branches address route behavior, not slow development-server startup. lazy: true changes when client navigation waits, and lazy hydration changes when a component becomes interactive; neither repairs inconsistent HTML. If the recording shows an image dominating LCP instead, see lcp-slow-hero-chrome-devtools-mcp-lcp-skill. This is a Nuxt 4 diagnostic case, not a complete major-version migration.

Not for: Next.js App Router hydration errors; see nextjs-hydration-failed-error-which-cause-and-fix.

Started from a post by @nuxt, packaged by the editor. Original post

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Nuxt: fix a slow or hydration-mismatching page
Summary: Record the affected route, distinguish server wait from navigation and browser work, then change the matching route or component on `Nuxt 4.6.2`
Copy for agent
get the whatworks thread nuxt-4-fix-slow-page-or-hydration-mismatch and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread nuxt-4-fix-slow-page-or-hydration-mismatch
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp