
- Installs
- 547
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/pymodel/react-frontend-skills --skill react- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads react automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
- Concurrent Rendering — CRITICAL
- 1.1 Avoid Suspense Fallback Thrashing — HIGH (prevents flickering, smoother UX)
- 1.2 Leverage Automatic Batching for Fewer Renders — HIGH (fewer renders in heavy updates)
- 1.3 Use useDeferredValue for Derived Expensive Values — CRITICAL (prevents jank in derived computations)
- 1.4 Use useTransition for Non-Blocking Updates — CRITICAL (keeps UI responsive during heavy updates)
- 1.5 Write Concurrent-Safe Components — MEDIUM-HIGH
- 1.6 Animate UI Changes with ViewTransition — MEDIUM (native View Transition API animations without manual class juggling)
- Server Components — CRITICAL
- 2.1 Avoid Client-Only Libraries in Server Components — MEDIUM-HIGH
- 2.2 Enable Streaming with Nested Suspense — MEDIUM-HIGH
- 2.3 Fetch Data in Server Components — CRITICAL (less client JS, no client waterfalls)
- 2.4 Minimize Server/Client Boundary Crossings — CRITICAL (reduces serialization overhead, smaller bundles)
- 2.5 Pass Only Serializable Props to Client Components — HIGH (prevents runtime errors, ensures correct hydration)
- 2.6 Use Composition to Mix Server and Client Components — HIGH (maintains server rendering for static content)
- 2.7 Render Context Providers in Server Components — LOW-MEDIUM (removes provider-wrapper components from the client tree; 19.3)
- Actions & Forms — HIGH
- 3.1 Use Form Actions Instead of onSubmit — HIGH (progressive enhancement, simpler code)
- 3.2 Use useActionState for Form State Management — HIGH (declarative form handling, automatic pending states)
- 3.3 Use useFormStatus for Submit Button State — MEDIUM-HIGH
- 3.4 Use useOptimistic for Instant UI Feedback — HIGH (instant perceived response, auto-rollback on failure)
- 3.5 Validate Forms on Server with Actions — MEDIUM (secure validation, consistent error handling)
- Data Fetching — HIGH
- 4.1 Fetch Data in Parallel with Promise.all — MEDIUM-HIGH
- 4.2 Use cache() for Request Deduplication — HIGH (eliminates duplicate fetches per render)
- 4.3 Use Error Boundaries with Suspense — MEDIUM (graceful error recovery, isolated failures)
- 4.4 Use Suspense for Declarative Loading States — HIGH (cleaner code, coordinated loading UI)
- 4.5 Use the use() Hook for Promises in Render — HIGH (cleaner async component code, Suspense integration)
- State Management — MEDIUM-HIGH
- 5.1 Calculate Derived Values During Render — MEDIUM (eliminates sync bugs, simpler code)
- 5.2 Split Context to Prevent Unnecessary Re-renders — MEDIUM (reduces re-renders from context changes)
- 5.3 Use Functional State Updates for Derived Values — MEDIUM-HIGH
- 5.4 Use Lazy Initialization for Expensive Initial State — MEDIUM-HIGH
- 5.5 Use useReducer for Complex State Logic — MEDIUM (clearer state transitions, easier testing)
- Memoization & Performance — MEDIUM
- 6.1 Avoid Premature Memoization — MEDIUM (memoization has overhead, measure first)
- 6.2 Leverage React Compiler for Automatic Memoization — MEDIUM (automatic optimization, less manual code)
- 6.3 Use React.memo for Expensive Pure Components — MEDIUM (skips re-render when props unchanged)
- 6.4 Use useCallback for Stable Function References — MEDIUM (prevents child re-renders from reference changes)
- 6.5 Use useMemo for Expensive Calculations — MEDIUM (skips expensive recalculation on re-renders)
- Effects & Events — MEDIUM
- 7.1 Always Clean Up Effect Side Effects — MEDIUM (prevents memory leaks, stale callbacks)
- 7.2 Avoid Effects for Derived State and User Events — MEDIUM (eliminates sync bugs, simpler code)
- 7.3 Avoid Object and Array Dependencies in Effects — MEDIUM (prevents infinite loops, unnecessary re-runs)
- 7.4 Use useEffectEvent for Non-Reactive Logic — MEDIUM (separates reactive from non-reactive code)
- 7.5 Use useSyncExternalStore for External Subscriptions — MEDIUM (correct subscription handling, SSR compatible)
- 7.6 Use use(browser()) for Client-Only Rendering — MEDIUM (no mounted-flag double render, React 19.3+)
- Component Patterns — LOW-MEDIUM
- 8.1 Choose Controlled vs Uncontrolled Appropriately — LOW-MEDIUM
- 8.2 Prefer Composition Over Props Explosion — LOW-MEDIUM
- 8.3 Use Key to Reset Component State — LOW-MEDIUM
- 8.4 Use Render Props for Inversion of Control — LOW-MEDIUM
- 8.5 Attach DOM Behavior to Siblings with Fragment Refs — LOW-MEDIUM (ref access to child DOM without wrapper elements; stable in 19.3)
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
- https://react.dev
- https://react.dev/blog/2024/12/05/react-19
- https://react.dev/blog/2025/10/01/react-19-2
- https://react.dev/learn/you-might-not-need-an-effect
- https://github.com/facebook/react
Related Skills
- For Next.js 16 App Router, see
nextjsskill - For client-side form handling, see
react-hook-formskill - For data caching with TanStack Query, see
tanstack-queryskill
FAQ
What does the react skill do?
React 19 components and hooks.
How do I install react?
Run npx skills add https://github.com/pymodel/react-frontend-skills --skill react in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/react/ (personal) or .claude/skills/react/ (project).
Which AI agents can use react?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is react safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains react?
It is published by pymodel in pymodel/react-frontend-skills. It has 547 recorded installs.
More from pymodel/react-frontend-skills
typescript
pymodel/react-frontend-skills
TypeScript types, tsconfig and TypeScript 7 migration.
ui-design
pymodel/react-frontend-skills
Accessible, responsive frontend UI and UX design.
tailwind
pymodel/react-frontend-skills
Tailwind CSS v4 styling and configuration.
nextjs
pymodel/react-frontend-skills
Open the skill to read its SKILL.md instructions.
playwright
pymodel/react-frontend-skills
Open the skill to read its SKILL.md instructions.
vitest
pymodel/react-frontend-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.