360 Secure SkillHub
360 安全技能中心

react

面向 React 19 应用的开发指导,按并发渲染、服务器组件、Actions 与表单、数据获取、状态管理、记忆化、副作用及组件模式 8 类提供 44 条规则,每条规则含原理说明与正误代码示例,并指明按任务查阅对应参考文档。

PyModel
热度 0.00
最近更新 2026-10-18 21:48:35
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码生成 / 代码审查 / 概念解释

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: 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/learn/you-might-not-need-an-effect
  5. 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