# React Next Best Practices

> React Next Best Practices is an Agent Skill for development published in the OpenBMB/PilotDeck repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

React/Next.js 项目最佳实践：组件拆分、数据获取、性能、bundle、RSC、hydration 和路由。

- Skill name: `react-next-best-practices`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/OpenBMB/PilotDeck/blob/HEAD/skills/react-next-best-practices/SKILL.md
- Repository: OpenBMB/PilotDeck (3,820 GitHub stars when collected)

## SKILL.md

# React / Next.js Best Practices

Use this skill when creating, reviewing, or refactoring React or Next.js applications.

## Focus Areas

- Component boundaries: keep components cohesive and avoid unnecessary abstraction.
- Data fetching: avoid waterfalls; keep server/client responsibilities explicit.
- Rendering model: distinguish Server Components, Client Components, SSR, SSG, and dynamic routes.
- State: keep local state local; avoid global state unless shared behavior requires it.
- Performance: watch bundle size, memoization misuse, expensive renders, image loading, and caching.
- Hydration: avoid browser-only values during server render unless guarded.
- Accessibility: use semantic HTML before custom ARIA.
- Testing: prefer targeted tests for changed behavior.

## Review Output

Return concrete findings with file paths, severity, and suggested fixes. Avoid generic advice unless tied to the current code.

## PilotDeck Migration Note

- Source inspiration: Vercel Agent Skills for React/Next.js workflows.
- This is a PilotDeck-native draft, not a verbatim copy and is not Vercel-platform-specific.

---

Source: https://www.openparable.com/skill/development/react-next-best-practices (OpenParable). Cite the canonical URL above.
