
Frontend Patterns
A solid reference for React patterns you'll actually use in production. Covers component composition (compound components, render props), custom hooks with proper dependency management, and context-plus-reducer for state. The examples are clean and show both the pattern and real usage. Especially useful for the performance optimization section with useMemo and useCallback patterns that avoid common pitfalls like infinite render loops. The useQuery hook implementation is a good teaching example if you're building your own data fetching before reaching for a library. Skips the basics and focuses on intermediate patterns you'd encounter building real apps with Next.js or similar frameworks.
- skills.sh installs
- 7.1K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill frontend-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Frontend Development Patterns
Modern frontend patterns for React, Next.js, and performant user interfaces.
When to Activate
- Building React components (composition, props, rendering)
- Managing state (useState, useReducer, Zustand, Context)
- Implementing data fetching (SWR, React Query, server components)
- Optimizing performance (memoization, virtualization, code splitting)
- Working with forms (validation, controlled inputs, Zod schemas)
- Handling client-side routing and navigation
- Building accessible, responsive UI patterns
Component Patterns
Composition Over Inheritance
// PASS: GOOD: Component composition
interface CardProps {
children: React.ReactNode
variant?: 'default' | 'outlined'
}
export function Card({ children, variant = 'default' }: CardProps) {
return <div className={`card card-${variant}`}>{children}</div>
}
export function CardHeader({ children }: { children: React.ReactNode }) {
return <div className="card-header">{children}</div>
}
export function CardBody({ children }: { children: React.ReactNode }) {
return <div className="card-body">{children}</div>
}
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Frontend Development, Debugging
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Coding Standards7K
- Market Research6.9K
- Python Patterns6.7K
- Api Design6.6K
- Laravel Security6.6K
- Frontend Slides6.5K
- Codebase Onboarding6.4K
- Frontend Design Direction6.4K
- E2e Testing6.4K
- Liquid Glass Design6.4K
- Tdd Workflow6.4K
- Database Migrations6.4K
- Android Clean Architecture6.4K
- Prompt Optimizer6.3K
- Golang Patterns6.3K
- Postgres Patterns6.3K
- Verification Loop6.3K
- Article Writing6.3K
- Django Patterns6.2K
- Cpp Coding Standards6.2K
- Golang Testing6.2K
- Deep Research6.2K
- Java Coding Standards6.2K
- Blender Motion State Inspection6.1K