react-expert

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

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/filippolmt/skills --skill react-expert-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-expert
Source: https://github.com/filippolmt/skills/tree/main/skills/react-expert
Command: npx skills add https://github.com/filippolmt/skills --skill react-expert-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building modern React applications requires navigating Server Components, React 19 hooks, state management choices, and performance pitfalls, and this Skill provides structured guidance and production-grade patterns for all of them. ## Core Features & Use Cases - Component Implementation: Creates TypeScript components for React 18/19, Next.js App Router Server Components, Suspense boundaries, and useActionState forms. - State Management & Data Fetching: Implements Context, Zustand, Redux Toolkit, and TanStack Query patterns with proper typing. - Migration & Optimization: Converts class components to hooks, applies memoization, code splitting with lazy(), and virtualization for large lists. - Use Case: When migrating a legacy class-based dashboard to React 19, the Skill maps lifecycle methods to hooks, sets up Server Components for data fetching, and validates types with tsc --noEmit. ## Quick Start Ask the assistant to build a React 19 form component with useActionState and TypeScript, including a test file using React Testing Library.

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, lifecycle methods like componentDidMount to useEffect with proper dependencies, and shouldComponentUpdate to React.memo. Error boundaries have no hook equivalent, so keep those as class components.

What state management library should I use for React?

Use useState for local state, Context for simple globals like theme, Zustand for medium complexity with minimal boilerplate, Redux Toolkit for complex state with devtools, and TanStack Query for server state and caching.

How do React 19 Server Components work with Next.js?

Server Components are the default in the App Router and can use async/await to fetch data directly without client bundle impact. Add the 'use client' directive only for components needing hooks, event handlers, or browser APIs.

Why does my useEffect cause stale closure bugs?

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

When should I use useMemo and useCallback in React?

Use useMemo only for expensive calculations and useCallback only when passing functions to memoized children. Over-memoizing simple values adds overhead without benefit, so measure performance before optimizing.