What problem does it solve?
It prevents React component designs from becoming unmaintainable when behavior is controlled by many boolean props and hidden conditionals, and it improves long-term scalability for teams and AI-assisted code changes.
Core Features & Use Cases
- Avoid Boolean Prop Proliferation: Replace combinatorial boolean modes with explicit composition-based variants.
- Use Compound Components with Context: Build reusable component APIs where subcomponents consume shared state via a provider-backed context contract (state/actions/meta).
- Lift State into Providers: Enable sibling UI (outside the main component tree) to read and act on shared state without prop drilling or awkward refs.
- Prefer Children Over Render Props: Use
children composition for clearer APIs unless render-prop data needs to be passed back.
- React 19 API Guidance: Apply React 19+ practices by using
use() (instead of useContext()) and treating ref as a regular prop rather than relying on forwardRef.
Quick Start
Use this skill when you are refactoring a React component that currently has many boolean props or complex conditional rendering, and ask the assistant to redesign it using compound components, lifted state providers, and explicit variant components following the included rule categories.