What problem does it solve?
React codebases often suffer from boolean prop proliferation, leading to complex, hard-to-maintain conditional rendering. This Skill provides proven composition patterns to structure components as explicit variants, functional compound components, and shareable context providers, reducing hard-to-reason about props and improving scalability.
Core Features & Use Cases
- Explicit variant components (e.g., ThreadComposer, EditMessageComposer, ForwardMessageComposer) that assemble UI from a shared Frame and subcomponents.
- Compound components with a shared context, enabling flexible composition without prop drilling.
- Context-based state management with a generic interface (state, actions, meta) to permit swapping implementations (local vs. global) without touching UI.
Quick Start
Use the vercel-composition-patterns skill to refactor a large React component that uses many boolean props by introducing a Frame-based composer, a ThreadComposer, and a ChannelProvider to lift state into a provider.