What problem does it solve?
Nuxt 4 apps often produce hydration mismatches and duplicate network requests when server-rendered markup diverges from client state or when data fetching is done at the wrong lifecycle. This skill helps you apply reliable Nuxt 4 patterns so SSR, hybrid rendering, and route-level behavior stay consistent.
Core Features & Use Cases
- Hydration Safety: Keep the first SSR render deterministic by avoiding browser-only APIs and non-deterministic values in SSR-rendered template state, using Nuxt routing composables, and moving client-only logic behind mounted/client-only boundaries.
- SSR-Safe Data Fetching: Prefer await useFetch and useAsyncData for page/component data that must be present in the initial payload, use stable keys, and reserve $fetch for user-triggered writes to avoid second-fetch issues.
- Route Rules + Performance: Apply routeRules for prerender/SWR/ISR/ssr:false decisions, and use lazy loading and lazy hydration for non-critical UI to reduce payload size and improve perceived performance.
Quick Start
Ask for a Nuxt 4 SSR refactor plan to eliminate a hydration mismatch by updating data fetching to use await useFetch or useAsyncData, adjusting routeRules, and converting any client-only logic to onMounted or ClientOnly.