React Best Practices

用于 React / Next.js 现有代码优化:当用户要检查渲染性能、data fetching、bundle size、缓存、架构健康或性能回退时使用。Combine with `frontend-design` when 先改界面再做工程收口;Prefer `frontend-design` when the main goal is 新界面设计或视觉重构;Do not use for 与 React/Next 无关的问题。

hebertzhu f6eb988 1.4 KB Updated

File contents

react-best-practices

Intent

  • 用于 React / Next.js 现有代码优化:当用户要检查渲染性能、data fetching、bundle size、缓存、架构健康或性能回退时使用。Combine with frontend-design when 先改界面再做工程收口;Prefer frontend-design when the main goal is 新界面设计或视觉重构;Do not use for 与 React/Next 无关的问题。

Default operating pattern

  1. Clarify audience, surface, success metric, and implementation boundary.
  2. Study relevant patterns, references, or constraints before proposing a direction.
  3. Define structure, interaction, copy, and visual hierarchy with a reusable rationale.
  4. Pressure-test accessibility, motion, maintainability, and platform fit.
  5. Return a concise recommendation and the next implementation move.

Pack fit

  • Included in: product-design
  • Keep examples generic, privacy-safe, and portable across hosts.

Boundary

  • Do not use for non-React stacks or pure product strategy work.

hebertzhu/agent-foundry/tree/main/skills/react-best-practices commit f6eb9880ef

Frequently asked questions

npx skillmds@latest add hebertzhu/react-best-practices