New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Comprehensive React 19 guidance for Server Components, hooks, state, forms, and testing.

version
2.1.2
GitHub stars
62
View on GitHub

What it does

  • Adds 4 commands (/react-component, /react-hook, /react-test, /react-optimize) and the react-expert agent
  • Bundles 9 skills covering fundamentals, hooks, patterns, performance, state management, forms, testing, and TypeScript
  • Covers Server and Client Components, Server Actions, the use() hook, and React 19 hooks like useActionState and useOptimistic
  • Designed for React projects that need help with state libraries such as Zustand, Jotai, and TanStack Query, plus Vitest or Jest with RTL

Comprehensive React 19 expertise covering Server Components, Client Components, hooks, state, and testing. PROACTIVELY activate for: (1) any React task, (2) React 19 Server/Client Components, (3) Server Actions, (4) hooks (useState/Effect/Ref/Memo/Callback/Transition/DeferredValue/ActionState/Optimistic/FormStatus), (5) state management (Context/Zustand/Jotai/TanStack Query/SWR), (6) component patterns, (7) TypeScript with React, (8) forms (React Hook Form, Zod), (9) performance optimization, (10) testing with Vitest/Jest + RTL. Provides: use() hook, Server/Client patterns, hooks with TS.

Add marketplace

/plugin marketplace add JosiahSiegel/claude-plugin-marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install react-master@claude-plugin-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

React Forms Skill

Use this skill for robust React forms: controlled inputs, React Hook Form, Zod validation, dynamic arrays, Server Actions, optimistic updates, reusable fields, file uploads, drag-and-drop, and multi-step wizards.

When to Use This Skill

Use when the user asks for tasks covered by the frontmatter triggers, especially implementation guidance, debugging, architecture choices, production hardening, or performance-sensitive decisions in this domain. Start from this orchestrator, then load the focused reference file that matches the requested detail level.

Core Workflow

  1. Choose the form model: controlled state for simple forms, React Hook Form for complex client forms, or Server Actions for framework-native submissions.
  2. Define validation near the data contract; prefer schema validation such as Zod when the shape is shared or complex.
  3. Wire accessibility from the start with labels, aria-invalid, aria-describedby, error text near fields, and disabled/loading submit states.
  4. For dynamic fields, use stable field IDs from useFieldArray and preserve validation paths as items are added, removed, or moved.
  5. For file uploads, validate type/size, generate previews only when appropriate, and submit via FormData.
  6. For multi-step forms, validate only the current step before advancing and keep one form context across steps when data must persist.

Key Gotchas

  • Do not mix controlled and uncontrolled patterns on the same input without a deliberate bridge component.
  • Disable submit while pending to prevent duplicate submissions.
  • Always surface server-side validation errors, even when client validation exists.
  • File previews can leak memory if object URLs are not revoked; Data URLs can be large for big files.
  • In Server Actions, keep progressive enhancement and pending/error states visible to the user.

Reference Map

  • references/react-forms-complete-guide.md - Full original guide covering controlled forms, validation, React Hook Form, Zod, field arrays, conditional fields, Server Actions, optimistic updates, custom components, uploads, drag-and-drop, multi-step forms, and best practices.

Response Guidance

  • Preserve the user's existing framework, library, and tooling choices unless there is a clear compatibility or performance reason to suggest an alternative.
  • Give copy-pasteable code only for the exact task at hand; otherwise point to the relevant reference section.
  • Call out tradeoffs, failure modes, and verification steps for production workflows.
  • Prefer accessible, maintainable, measurable solutions over clever micro-optimizations.

Readme

React Master Plugin

Comprehensive React 19 expertise for Claude Code, covering modern React development patterns, hooks, server components, state management, testing, and performance optimization.

Features

This plugin provides expertise in:

  • React 19 Fundamentals - Server/client components, the use hook, server actions
  • Hooks Mastery - All built-in hooks with advanced patterns
  • State Management - Context, Redux, Zustand, Jotai, TanStack Query
  • Component Patterns - Compound components, render props, HOCs, custom hooks
  • Performance - Memoization, code splitting, concurrent features
  • Testing - Vitest, Jest, React Testing Library
  • TypeScript - Full type safety with React
  • Forms - React Hook Form, controlled/uncontrolled patterns
  • Accessibility - ARIA, keyboard navigation, screen readers

Skills

SkillDescription
react-fundamentals-19React 19 core concepts, JSX, components
react-hooks-completeAll hooks with patterns and best practices
react-server-componentsRSC, client components, server actions
react-state-managementContext, external libraries, patterns
react-performanceOptimization, memoization, profiling
react-testingTesting strategies and tools
react-patternsAdvanced component patterns
react-typescriptTypeScript with React
react-formsForm handling and validation

Commands

CommandDescription
/react-componentCreate a new React component
/react-hookCreate a custom hook
/react-testGenerate component tests
/react-optimizeAnalyze and optimize performance

Quick Reference

React 19 New Features

// Server Component (default in App Router)
async function ServerComponent() {
  const data = await fetchData();
  return <div>{data}</div>;
}

// Client Component
'use client';
function ClientComponent() {
  const [state, setState] = useState(0);
  return <button onClick={() => setState(s => s + 1)}>{state}</button>;
}

// Server Action
async function submitForm(formData: FormData) {
  'use server';
  await saveToDatabase(formData);
}

// use() hook for promises
function Comments({ commentsPromise }) {
  const comments = use(commentsPromise);
  return comments.map(c => <p key={c.id}>{c.text}</p>);
}

Essential Hooks

// State
const [state, setState] = useState(initialValue);
const [state, dispatch] = useReducer(reducer, initialState);

// Effects
useEffect(() => { /* side effect */ return cleanup; }, [deps]);
useLayoutEffect(() => { /* sync effect */ }, [deps]);

// Context
const value = useContext(MyContext);

// Refs
const ref = useRef(initialValue);
const callback = useCallback(fn, [deps]);
const memoized = useMemo(() => compute(), [deps]);

// React 19
const [isPending, startTransition] = useTransition();
const deferredValue = useDeferredValue(value);
const [state, action, isPending] = useActionState(serverAction, initial);

Component Patterns

// Compound Components
<Tabs>
  <Tabs.List>
    <Tabs.Tab>One</Tabs.Tab>
    <Tabs.Tab>Two</Tabs.Tab>
  </Tabs.List>
  <Tabs.Panels>
    <Tabs.Panel>Content 1</Tabs.Panel>
    <Tabs.Panel>Content 2</Tabs.Panel>
  </Tabs.Panels>
</Tabs>

// Render Props
<DataFetcher url="/api/data">
  {({ data, loading, error }) => (
    loading ? <Spinner /> : <DataView data={data} />
  )}
</DataFetcher>

// Custom Hook
function useLocalStorage<T>(key: string, initial: T) {
  const [value, setValue] = useState<T>(() => {
    const stored = localStorage.getItem(key);
    return stored ? JSON.parse(stored) : initial;
  });

  useEffect(() => {
    localStorage.setItem(key, JSON.stringify(value));
  }, [key, value]);

  return [value, setValue] as const;
}

Performance Optimization

// Memoize expensive components
const MemoizedComponent = React.memo(ExpensiveComponent);

// Memoize callbacks
const handleClick = useCallback(() => {
  doSomething(id);
}, [id]);

// Memoize computed values
const sortedItems = useMemo(() => {
  return items.sort((a, b) => a.name.localeCompare(b.name));
}, [items]);

// Code splitting
const LazyComponent = React.lazy(() => import('./HeavyComponent'));

// Suspense boundary
<Suspense fallback={<Loading />}>
  <LazyComponent />
</Suspense>

Installation

# Add to your Claude Code project
claude mcp add react-master

Usage

Simply ask questions about React development:

  • "How do I implement a custom hook for form validation?"
  • "What's the best way to handle global state in React 19?"
  • "How do I optimize a slow-rendering list?"
  • "How do I test components with React Testing Library?"

Version Compatibility

  • React 18.x and 19.x
  • TypeScript 5.x
  • Node.js 18+

Details

Marketplace
JosiahSiegel/claude-plugin-marketplace
Source
plugins/react-master
Author
Josiah Siegel
Category
Community
Keywords
react, react19, server-components, client-components, hooks, useState, useEffect, useTransition, useOptimistic, state-management, zustand, jotai, tanstack-query, testing, vitest, react-testing-library, typescript, patterns, forms, performance
Listed since
Apr 7, 2026

More from JosiahSiegel/claude-plugin-marketplace

All 43

Similar to react-master

More Frontend & UI Code