What problem does it solve?
Modern React and Next.js apps often become hard to maintain, suffer unnecessary re-renders, and mix concerns between UI, state, and side effects; this Skill provides patterns to organize components, manage state, and optimize performance so UIs remain fast and maintainable.
Core Features & Use Cases
- Component Composition & Patterns: Prefer composition and compound components to keep UIs modular and reusable.
- State Management & Hooks: Examples for useState, useReducer with Context, and custom hooks to encapsulate reusable logic.
- Performance & Data Fetching: Memoization, virtualization, code-splitting, and strategies for SWR/React Query and server components.
- Forms & Validation: Controlled forms, validation flows and integration ideas for schema validation.
- Use Case: Refactor a dashboard to use compound components for layout, migrate distributed state into a Context+Reducer store, and lazy-load heavy charts to reduce initial load time.
Quick Start
Use frontend-patterns to refactor a React component for better composition, add a custom hook for state encapsulation, and apply memoization to reduce unnecessary renders.