- 对于服务器组件中的数据获取(在 .tsx 文件中):
async function getData() { const res = await fetch('https://api.example.com/data', { next: { revalidate: 3600 } }) if (!res.ok) throw new Error('获取数据失败') return res.json() } export default async function Page() { const data = await getData() // 使用数据渲染组件 }
Nextjs 14 SEO Data Fetching Rules For Server Components
Next.js 14 中服务器组件的数据获取规则。
Nextjs 14 SEO Data Fetching Rules For Server Components by liaosw97 · eb9be9d
npx skillmds@latest add liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components File contents
---name: nextjs-14-seo-data-fetching-rules-for-server-componentsdescription: Next.js 14 中服务器组件的数据获取规则。---- 对于服务器组件中的数据获取(在 .tsx 文件中): ```tsx async function getData() { const res = await fetch('https://api.example.com/data', { next: { revalidate: 3600 } }) if (!res.ok) throw new Error('获取数据失败') return res.json() } export default async function Page() { const data = await getData() // 使用数据渲染组件 } ```
liaosw97/awesome-rules-skills/tree/main/plugins/nextjs/skills/nextjs-14-seo-data-fetching-rules-for-server-components commit eb9be9d388
Frequently asked questions
Run npx skillmds@latest add liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Next.js 14 中服务器组件的数据获取规则。 It is listed under Marketing & Growth on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.