agentsclimarketplace

React

Skill ComeOnOliver/skillshub/skills/pproenca/dot-skills/react

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description

Install
npx -y skills add ComeOnOliver/skillshub --skill react

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

9.9 KB, ~2.5k tokens by cl100k_base, as published. Nobody here has run it

React 19 Best Practices

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

When to Apply

  • Writing new React components or refactoring existing ones
  • Optimizing re-render performance or bundle size
  • Using concurrent features (useTransition, useDeferredValue, Activity)
  • Setting up Server Components or server/client boundaries
  • Implementing form actions, optimistic updates, or data fetching
  • Configuring React Compiler for automatic memoization
  • Reviewing React code for common anti-patterns

Rule Categories

CategoryImpactRulesKey Topics
Concurrent RenderingCRITICAL6useTransition, useDeferredValue, Activity, batching
Server ComponentsCRITICAL6RSC boundaries, data fetching, streaming
Actions & FormsHIGH5Form actions, useActionState, useOptimistic
Data FetchingHIGH5use() hook, cache(), Suspense, error boundaries
State ManagementMEDIUM-HIGH5Derived values, context optimization, useReducer
Memoization & PerformanceMEDIUM5React Compiler, useMemo, useCallback, React.memo
Effects & EventsMEDIUM5useEffectEvent, cleanup, external stores
Component PatternsLOW-MEDIUM4Composition, controlled vs uncontrolled, key reset

Quick Reference

Critical patterns β€” get these right first:

  • Fetch data in Server Components, not Client Components
  • Push 'use client' boundaries as low as possible
  • Use startTransition for expensive non-blocking updates
  • Use <Activity> to preserve state across tab/page switches

Common mistakes β€” avoid these anti-patterns:

  • Creating promises inside Client Components for use() (causes infinite loops)
  • Memoizing everything (use React Compiler v1.0+ instead)
  • Using effects for derived state or user event handling
  • Placing 'use client' too high in the component tree

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

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/2025/10/07/react-compiler-1
  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-16-app-router skill
  • For client-side form handling, see react-hook-form skill
  • For data caching with TanStack Query, see tanstack-query skill

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.