What problem does it solve?
This Skill helps you design and refactor React components so they stay flexible, readable, and maintainable as they grow. It is especially useful when boolean props, deep prop drilling, or one-size-fits-all component APIs are making UI code hard to extend.
Core Features & Use Cases
- Compound Components: Break large components into composable parts that share state through context rather than props.
- Lifted State: Move state into provider components so sibling UI, dialogs, previews, and action buttons can all participate cleanly.
- Explicit Variants: Replace boolean mode flags with self-documenting components like ThreadComposer, EditMessageComposer, and ForwardMessageComposer.
- Children Over Render Props: Prefer natural composition with children when building static UI structure.
- React 19 Guidance: Update component patterns for modern React APIs, including ref as a regular prop and use() instead of useContext().
- Use Case: Refactor a chat composer, form builder, or design-system component library that has grown too many flags into a clearer, dependency-injected composition model.
Quick Start
Ask me to refactor a React component or component library into compound components with lifted state, explicit variants, and React 19-compatible context patterns.