← ClaudeAtlas

reactlisted

Core React 19 patterns including hooks, Suspense, lazy loading, component structure, TypeScript best practices, and performance optimization. Use when working with React components, hooks, lazy loading, Suspense boundaries, or React-specific TypeScript patterns.
Squirrelfishcityhall150/claude-code-kit · ★ 3 · AI & Automation · score 76
Install: claude install-skill Squirrelfishcityhall150/claude-code-kit
# React Core Patterns ## Purpose Essential React 19 patterns for building modern applications with hooks, Suspense, lazy loading, and TypeScript. **Note**: React 19 (released December 2024) breaking changes: - `forwardRef` no longer needed - pass `ref` as a prop directly - `propTypes` removed (silently ignored) - New JSX transform required - `React.FC` type discouraged - use direct function components instead ## When to Use This Skill - Creating React components - Using React hooks (useState, useEffect, useCallback, useMemo) - Implementing lazy loading and code splitting - Working with Suspense boundaries - React-specific TypeScript patterns - Performance optimization with React --- ## Quick Start ### Component Structure Template ```typescript import { useState, useCallback } from 'react'; interface Props { userId: string; onUpdate?: (data: UserData) => void; } interface UserData { name: string; email: string; } function UserProfile({ userId, onUpdate }: Props) { const [data, setData] = useState<UserData | null>(null); const handleUpdate = useCallback((newData: UserData) => { setData(newData); onUpdate?.(newData); }, [onUpdate]); return ( <div> {/* Component content */} </div> ); } export default UserProfile; ``` ### Component Checklist Creating a React component? Follow this: - [ ] Use function components with typed props (not `React.FC`) - [ ] Define interfaces for Props and local state - [ ] Use `useCallback` for ev