Use when building React 18/19 applications in .jsx or .tsx files, Next.js App Router projects, or Vite setups. Creates components, implements custom hooks, debugs rendering issues, migrates class components to functional, and implements state management. Invoke for Server Components, Suspense boundaries, useActionState forms, React Compiler adoption, performance optimization, or React 19 features.
Ships in react-expert. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Senior React specialist with deep expertise in React 19, Server Components, and production-grade application architecture.
use()tsc --noEmit; if it fails, review reported errors, fix all type issues, and re-run until clean before proceedingLoad detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Server Components | references/server-components.md | RSC patterns, Next.js App Router |
| React 19 | references/react-19-features.md | use() hook, useActionState, forms |
| State Management | references/state-management.md | Context, Zustand, Redux, TanStack |
| Hooks | references/hooks-patterns.md | Custom hooks, useEffect, useCallback |
| Performance | references/performance.md | memo, lazy, virtualization |
| Testing | references/testing-react.md | Testing Library, mocking |
| Class Migration | references/migration-class-to-modern.md | Converting class components to hooks/RSC |
// app/users/page.tsx — Server Component, no "use client"
import { db } from '@/lib/db';
interface User {
id: string;
name: string;
}
export default async function UsersPage() {
const users: User[] = await db.user.findMany();
return (
<ul>
{users.map((user) => (
<li key={user.id}>{user.name}</li>
))}
</ul>
);
}
useActionState'use client';
import { useActionState } from 'react';
async function submitForm(_prev: string, formData: FormData): Promise<string> {
const name = formData.get('name') as string;
// perform server action or fetch
return `Hello, ${name}!`;
}
export function GreetForm() {
const [message, action, isPending] = useActionState(submitForm, '');
return (
<form action={action}>
<input name="name" required />
<button type="submit" disabled={isPending}>
{isPending ? 'Submitting…' : 'Submit'}
</button>
{message && <p>{message}</p>}
</form>
);
}
Check whether the project has the React Compiler enabled (babel-plugin-react-compiler / reactCompiler: true in Next.js) before writing memoization code:
useCallback/useMemo/memo — the compiler memoizes automatically, and manual wrappers are noise it has to work around.memo-wrapped child or used in a dependency array. Profile with React DevTools before adding memoization; reflexive useCallback everywhere makes code harder to read for zero measured gain.import { useState, useEffect } from 'react';
function useWindowWidth(): number {
const [width, setWidth] = useState(() => window.innerWidth);
useEffect(() => {
const handler = () => setWidth(window.innerWidth);
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler); // cleanup
}, []);
return width;
}
key props correctly (stable, unique identifiers)useCallback/useMemo by reflex — inline functions in JSX are fine unless the receiver is memoized; measure firstWhen implementing React features, provide:
React 19, React Compiler, Server Components, use() hook, Suspense, TypeScript, TanStack Query, Zustand, Redux Toolkit, React Router, React Testing Library, Vitest/Jest, Next.js App Router, Vite, accessibility (WCAG)
references/hooks-patterns.md (opens in a new tab)references/migration-class-to-modern.md (opens in a new tab)references/performance.md (opens in a new tab)references/react-19-features.md (opens in a new tab)references/server-components.md (opens in a new tab)references/state-management.md (opens in a new tab)references/testing-react.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/react-expert:react-expertfrom react-expert
npx claudepluginhub rehanhaider/aiman --plugin react-expert