What problem does it solve?
This Skill provides a comprehensive guide to advanced React composition patterns, helping developers avoid common pitfalls like boolean prop proliferation and create more flexible, maintainable, and scalable component architectures.
Core Features & Use Cases
- Component Architecture: Learn to structure components using compound components and avoid excessive boolean props.
- State Management: Understand how to lift state into providers and decouple state logic from UI components.
- Implementation Patterns: Discover best practices like preferring children over render props and creating explicit component variants.
- React 19 APIs: Stay updated with new APIs like
use() and simplified ref handling.
- Use Case: Refactor a complex
Card component that currently uses numerous boolean props (e.g., isHoverable, isDraggable, isSelectable) into a set of well-defined, composable sub-components that achieve the same functionality with greater clarity and flexibility.
Quick Start
Apply the vercel-composition-patterns skill to refactor the Composer component to use compound components instead of boolean props.