
Nuxt4 Patterns
This one's for when you're fighting hydration mismatches or trying to squeeze performance out of a Nuxt 4 app. It covers the sharp edges: keeping server and client renders identical, picking the right data fetcher (useFetch vs useAsyncData vs $fetch), setting route rules for prerender/SWR/ISR per page group, and lazy loading components that don't need to block paint. The hydration guidance is especially practical, like avoiding Date.now() in SSR templates and not using route.fullPath for server-rendered markup. If you're doing anything beyond a basic SSR setup or you've seen "Hydration mismatch" errors, you'll want this loaded.
- skills.sh installs
- 4.4K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill nuxt4-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Nuxt 4 Patterns
Use when building or debugging Nuxt 4 apps with SSR, hybrid rendering, route rules, or page-level data fetching.
When to Activate
- Hydration mismatches between server HTML and client state
- Route-level rendering decisions such as prerender, SWR, ISR, or client-only sections
- Performance work around lazy loading, lazy hydration, or payload size
- Page or component data fetching with
useFetch,useAsyncData, or$fetch - Nuxt routing issues tied to route params, middleware, or SSR/client differences
Hydration Safety
- Keep the first render deterministic. Do not put
Date.now(),Math.random(), browser-only APIs, or storage reads directly into SSR-rendered template state. - Move browser-only logic behind
onMounted(),import.meta.client,ClientOnly, or a.client.vuecomponent when the server cannot produce the same markup. - Use Nuxt's
useRoute()composable, not the one fromvue-router. - Do not use
route.fullPathto drive SSR-rendered markup. URL fragments are client-only, which can create hydration mismatches. - Treat
ssr: falseas an escape hatch for truly browser-only areas, not a default fix for mismatches.
Data Fetching
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- First seen
- Apr 16, 2026
More from affaan-m/everything-claude-code
All 256- Browser Qa4.3K
- Jira Integration4.3K
- Rules Distill4.3K
- Click Path Audit4.2K
- Git Workflow4.2K
- Hexagonal Architecture4.2K
- Remotion Video Creation4.2K
- Santa Method4.2K
- Skill Comply4.2K
- Laravel Verification4.1K
- Nestjs Patterns4.1K
- Autonomous Agent Harness4K
- Benchmark4K
- Brand Voice4K
- Healthcare Phi Compliance4K
- Laravel Plugin Discovery4K
- Repo Scan4K
- Safety Guard4K
- Seo4K
- Agent Payment X4023.9K
- Canary Watch3.9K
- Ck3.9K
- Council3.9K
- Dart Flutter Patterns3.9K