Skillshub react

React 19 Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/react" ~/.claude/skills/comeonoliver-skillshub-react && rm -rf "$T"
manifest: skills/pproenca/dot-skills/react/SKILL.md
source content

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 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/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