nuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData. Use when building or reviewing a Nuxt 4 app, or debugging hydration mismatches and SSR-safe data fetching.
原文 · 译文未通过检查适用对象:Vue / Nuxt。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Nuxt 4 Patterns
- When to Activate
- Hydration Safety
- Data Fetching
- Route Rules
- Lazy Loading and Performance
- Review Checklist
Use when building or debugging Nuxt 4 apps with SSR, hybrid rendering, route rules, or page-level data fetching. 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 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.vue component when the server cannot produce the same markup. Use Nuxt's useRoute() composable, not the one from vue-router. Do not use route.fullPath to drive SSR-rendered markup. URL fragments are client-only, which can create hydration mismatches. Treat ssr: false as an escape hatch for truly browser-only areas, not a default fix for mismatches. Prefer await useFetch() for SSR-safe API reads in pages and components. It forwards server-fetched data into the Nuxt payload and
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- affaan-m/ECC
- 源文件
- pi/core/skills/nuxt4-patterns/SKILL.md
- 固定版本
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.157Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。