# 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 无关的问题。

- Skill: `hebertzhu/react-best-practices` (Agent Skill)
- Install (CLI): `npx skillmds@latest add hebertzhu/react-best-practices`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hebertzhu/react-best-practices/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: hebertzhu (https://skillmd.com/u/hebertzhu)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hebertzhu/react-best-practices

---


# 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.

