360 Secure SkillHub
360 安全技能中心

react

该 Skill 是一份 React 19 最佳实践参考,按并发渲染、服务端组件、Actions 与表单、数据获取、状态管理、记忆化、Effect 和组件模式等类别列出规则,并给出适用场景、原因和正反代码示例,帮助开发者优化组件与 Hooks 的写法。

分类:开发
PyModel
热度 0.00
最近更新 2026-11-10 05:27:21

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add pymodel/react-frontend-skills/react
兼容性
通用兼容
联网要求
需要联网
数据出网
数据不出本机
Metadata
name
react
description
React 19 components and hooks.

React 19 Best Practices

Comprehensive performance optimization guide for React 19 applications. Contains 44 rules across 8 categories, prioritized by impact from critical (concurrent rendering, server components) to incremental (component patterns). Covers the React 19.3 stabilizations: <ViewTransition>, Fragment refs, and direct Context providers in Server Components.

Table of Contents

  1. Concurrent Rendering — CRITICAL
  2. Server Components — CRITICAL
  3. Actions & Forms — HIGH
  4. Data Fetching — HIGH
  5. State Management — MEDIUM-HIGH
  6. Memoization & Performance — MEDIUM
  7. Effects & Events — MEDIUM
  8. Component Patterns — LOW-MEDIUM

How to Use

Run in the project root first:

npx -y @pymodel/react-frontend-skills detect  # installed vs. targeted versions

Read references/<rule-id>.md for each rule above that matches the task: why it matters, then incorrect vs. correct code.

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/blog/2026/09/09/react-19-3
  5. https://react.dev/learn/you-might-not-need-an-effect
  6. https://github.com/facebook/react

Related Skills

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