What problem does it solve?
This Skill helps React developers avoid common mistakes and adopt modern, maintainable patterns for building TypeScript React components, custom hooks, and performant UIs.
Core Features & Use Cases
- Typed props & component patterns: clear guidance on interface definitions, default values, and safe callback typing for predictable APIs.
- Composition & compound components: patterns for building modular, reusable UI primitives and context-backed compound components.
- Custom hooks & data fetching: reusable hook examples with loading, error handling, and refetch semantics.
- State management: recommendations for Context + useReducer and lightweight stores such as Zustand for predictable global state.
- Performance optimization: practical use of useMemo, useCallback, React.memo, lazy loading, virtualization, and memoization strategies.
- Forms, validation & error boundaries: strategies for controlled forms, validation (Zod suggested), and robust error handling.
- Anti-patterns to avoid: common pitfalls like creating objects in render, missing effect dependencies, and mutable state updates with examples to fix them.
Quick Start
Review my React component and provide concrete refactors using hooks, typed props, proper state management, and performance optimizations.