react-best-practices
Intent
- 用于 React / Next.js 现有代码优化:当用户要检查渲染性能、data fetching、bundle size、缓存、架构健康或性能回退时使用。Combine with
frontend-designwhen 先改界面再做工程收口;Preferfrontend-designwhen the main goal is 新界面设计或视觉重构;Do not use for 与 React/Next 无关的问题。
Default operating pattern
- Clarify audience, surface, success metric, and implementation boundary.
- Study relevant patterns, references, or constraints before proposing a direction.
- Define structure, interaction, copy, and visual hierarchy with a reusable rationale.
- Pressure-test accessibility, motion, maintainability, and platform fit.
- 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.