What problem does it solve?
This Skill solves the issue of unmaintainable React components that rely on boolean prop proliferation, which creates exponential conditional logic, makes component libraries hard to refactor, and introduces impossible state combinations as codebases scale.
Core Features & Use Cases
- Anti-Boolean Prop Patterns: Eliminate unmaintainable boolean props by using explicit component variants and compound components for flexible, self-documenting UI.
- Decoupled State Management: Implement generic context interfaces and lifted state providers to separate state logic from UI, enabling the same components to work with local, global, or synced state implementations.
- React 19 Best Practices: Follow updated React 19 API guidelines for cleaner component definitions, including ref as a regular prop and the
use() hook for context consumption.
- Use Case: When building a reusable messaging UI library, use these patterns to create shared Composer components that work across channel, thread, edit, and forward flows without duplicated logic or conditional prop checks.
Quick Start
Use the vercel-composition-patterns skill to refactor your existing monolithic Composer component to use compound components and eliminate all boolean prop conditionals.