react-expert

Implements React 18+ and React 19 components, hooks, and state management with TypeScript.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill react-expert-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-expert
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/react-expert
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill react-expert-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building modern React applications requires keeping up with React 19 features, Server Components, and evolving state management patterns, and mistakes like stale closures, missing effect cleanup, or poor memoization cause subtle bugs and performance issues. ## Core Features & Use Cases - Component & Hook Implementation: Creates TypeScript components, custom hooks (useDebounce, useLocalStorage, useMediaQuery), and React 19 patterns like useActionState forms, useOptimistic updates, and the use() hook. - Server Components & Next.js App Router: Implements async Server Components, Suspense streaming, Server Actions, and correct server/client component boundaries. - State Management & Migration: Implements Context, Zustand, Redux Toolkit, and TanStack Query, and migrates class components to functional components with hooks. - Use Case: When converting a legacy class-based UserProfile component to modern React, the skill maps lifecycle methods to useEffect, adds cleanup and cancellation flags, and validates types with tsc --noEmit. ## Quick Start Use the react-expert skill to build a Next.js App Router page that fetches users in a Server Component and renders a client-side form using useActionState.

Frequently Asked Questions about react-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a React class component to hooks?

Map constructor state to useState, componentDidMount and componentDidUpdate to useEffect with proper dependencies, and componentWillUnmount to the effect cleanup function. Replace shouldComponentUpdate with React.memo and convert HOCs or render props to custom hooks.

How do I use React 19 useActionState for forms?

Pass an async action function and initial state to useActionState, which returns the current state, a form action, and a pending flag. Attach the returned action to the form element and use isPending to disable inputs during submission.

Zustand vs Redux Toolkit for React state management?

Zustand suits medium-complexity state with minimal boilerplate and supports persistence middleware. Redux Toolkit fits complex state requiring middleware, devtools, and predictable action-based updates, while TanStack Query is preferred for server state and caching.

When should I use Server Components vs Client Components in Next.js?

Use Server Components for data fetching, database access, and SEO-critical content since they support async/await without client bundle cost. Use Client Components marked with 'use client' when you need hooks, event handlers, or browser APIs.

Why does my useEffect cause stale closure bugs?

Stale closures occur when effects capture outdated state because dependencies are missing from the dependency array. Fix this by using functional state updates like setCount(prev => prev + 1) or adding all used values to the dependency array.

When should I not migrate a class component to hooks?

Avoid migrating error boundaries, since componentDidCatch has no hook equivalent, and skip stable components that work and are not changing. Also avoid migration when third-party libraries require class inheritance or the team lacks hooks expertise.