React Expert
React 18+/19: components, hooks, Server Components, performance.
When to use
Building/refactoring React components (.jsx/.tsx); custom hooks; debugging rendering; migrating class → functional; state management; Server Components, Suspense, useActionState; perf optimization.
Core workflow
- Analyze — component tree, state ownership, render triggers.
- Design — composition, custom hooks for reuse, server vs client boundary.
- Implement — functional components + hooks; lift state appropriately.
- Optimize —
memo, useMemo, useCallback only where measured; stable keys.
- Test — React Testing Library, user-centric assertions.
Key practices
- Functional components + hooks only; rules of hooks (top level, no conditionals).
- Custom hooks (
useX) to extract reusable stateful logic.
- Server Components for data fetching;
"use client" only where interactivity needed.
- State libs: Zustand for client state, TanStack Query for server state.
- Effects only for true external synchronization; derive don't store.
- Stable, unique keys in lists (never index for dynamic lists).
Constraints
MUST: follow rules of hooks; lift state to lowest common ancestor; stable list keys; memoize only proven hot paths; clean up effects; user-centric tests.
MUST NOT: derive state into other state (compute during render); index keys on reorderable lists; overuse useEffect; prop-drill deeply (use context/store); mutate state directly.
Output
- Component(s) + custom hooks. 2. State management wiring. 3. RTL tests. 4. Brief note on render/perf decisions.
Knowledge
React 18/19, JSX, hooks, Server Components, Suspense, useActionState, Context, Zustand, Redux Toolkit, TanStack Query, React Testing Library, memoization.
1---2name: react-expert3description: "Use when building React 18+/19 apps in .jsx/.tsx, Next.js App Router projects, or CRA setups — components, custom hooks, Server Components, Suspense, state management, perf. Triggers: React, JSX, hooks, useState, useEffect, useContext, Server Components, React 19, Suspense, TanStack Query, Redux, Zustand, component."4version: 1.0.05license: MIT6tags: [react, jsx, hooks, server-components, suspense, zustand, tanstack-query, frontend]7source: https://github.com/jeffallan/claude-skills/tree/main/skills/react-expert8derived_from: awesomeclaude9metadata:10 source: https://skillmd.com/skills/aashutosh396/react-expert11---1213# React Expert1415React 18+/19: components, hooks, Server Components, performance.1617## When to use1819Building/refactoring React components (.jsx/.tsx); custom hooks; debugging rendering; migrating class → functional; state management; Server Components, Suspense, `useActionState`; perf optimization.2021## Core workflow22231. **Analyze** — component tree, state ownership, render triggers.242. **Design** — composition, custom hooks for reuse, server vs client boundary.253. **Implement** — functional components + hooks; lift state appropriately.264. **Optimize** — `memo`, `useMemo`, `useCallback` only where measured; stable keys.275. **Test** — React Testing Library, user-centric assertions.2829## Key practices3031- Functional components + hooks only; rules of hooks (top level, no conditionals).32- Custom hooks (`useX`) to extract reusable stateful logic.33- Server Components for data fetching; `"use client"` only where interactivity needed.34- State libs: Zustand for client state, TanStack Query for server state.35- Effects only for true external synchronization; derive don't store.36- Stable, unique keys in lists (never index for dynamic lists).3738## Constraints3940MUST: follow rules of hooks; lift state to lowest common ancestor; stable list keys; memoize only proven hot paths; clean up effects; user-centric tests.41MUST NOT: derive state into other state (compute during render); index keys on reorderable lists; overuse `useEffect`; prop-drill deeply (use context/store); mutate state directly.4243## Output44451. Component(s) + custom hooks. 2. State management wiring. 3. RTL tests. 4. Brief note on render/perf decisions.4647## Knowledge4849React 18/19, JSX, hooks, Server Components, Suspense, useActionState, Context, Zustand, Redux Toolkit, TanStack Query, React Testing Library, memoization.