What problem does it solve?
It solves the maintainability collapse that happens when React components grow too many boolean props and hidden conditional branches, making APIs hard to reason about and refactor.
Core Features & Use Cases
- Compound component architecture: Use Providers plus composed subcomponents (Frame/Input/Footer/Submit-style parts) so internals are shared via context instead of prop drilling.
- Lifted state with dependency-injected context: Centralize state management in a provider boundary and expose a generic contract (state/actions/meta) that multiple providers can implement.
- Explicit variants over boolean modes: Replace prop-driven “modes” with dedicated components (e.g., ThreadComposer, EditComposer) to eliminate impossible/undefined UI combinations.
- React 19-focused correctness: Use React 19 guidance by treating ref as a normal prop and preferring
use() over useContext().
Quick Start
Ask an AI to refactor your current React component by removing boolean props, introducing a compound component structure with lifted provider state, and splitting each boolean mode into explicit variant components.