AgentSkillsCN

react

React 19 性能优化指南——聚焦并发渲染、服务器组件、操作、钩子与记忆化(旧称“react-19”)。在编写 React 19 组件、使用并发特性,或优化重新渲染时,应使用此技能。请注意,此技能并不涵盖 Next.js 特有的功能,如 App Router、next.config.js,或 Next.js 缓存(请使用 nextjs-16-app-router 技能)。若需使用 React Hook Form 进行客户端表单验证,请使用 react-hook-form 技能。

SKILL.md
--- frontmatter
name: react
description: React 19 performance optimization guidelines for concurrent rendering, Server Components, actions, hooks, and memoization (formerly react-19). This skill should be used when writing React 19 components, using concurrent features, or optimizing re-renders. This skill does NOT cover Next.js-specific features like App Router, next.config.js, or Next.js caching (use nextjs-16-app-router skill). For client-side form validation with React Hook Form, use react-hook-form skill.

React 19 Best Practices

Comprehensive performance optimization guide for React 19 applications. Contains 40 rules across 8 categories, prioritized by impact from critical (concurrent rendering, server components) to incremental (component patterns).

Table of Contents

  1. Concurrent RenderingCRITICAL
  2. Server ComponentsCRITICAL
  3. Actions & FormsHIGH
  4. Data FetchingHIGH
  5. State ManagementMEDIUM-HIGH
  6. Memoization & PerformanceMEDIUM
  7. Effects & EventsMEDIUM
  8. Component PatternsLOW-MEDIUM

References

  1. https://react.dev
  2. https://react.dev/blog/2024/12/05/react-19
  3. https://react.dev/blog/2025/10/01/react-19-2
  4. https://react.dev/learn/you-might-not-need-an-effect
  5. https://github.com/facebook/react

Related Skills

  • For Next.js 16 App Router, see nextjs-16-app-router skill
  • For client-side form handling, see react-hook-form skill
  • For data caching with TanStack Query, see tanstack-query skill