# Nextjs 14 SEO Data Fetching Rules For Server Components

> Next.js 14 中服务器组件的数据获取规则。

- Skill: `liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components`
- Raw SKILL.md: https://api.skillmd.com/api/skills/liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: liaosw97 (https://skillmd.com/u/liaosw97)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/liaosw97/nextjs-14-seo-data-fetching-rules-for-server-components

---


- 对于服务器组件中的数据获取（在 .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()
    // 使用数据渲染组件
  }
  ```

