composition-patterns

Provide scalable React component patterns to reduce boolean prop proliferation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/danmarauda/pro --skill composition-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: composition-patterns
Source: https://github.com/danmarauda/pro/tree/main/.claude/skills/composition-patterns
Command: npx skills add https://github.com/danmarauda/pro --skill composition-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactor and design React components to avoid prop explosion and create flexible, maintainable APIs that scale with your project.

Core Features & Use Cases

  • Compound Components for shared implicit state and clean composition.
  • State Lifting and controlled components to simplify data flow and reuse.
  • Headless patterns, render props, and polymorphism for flexible UI.

Quick Start

Integrate this guide to begin applying composition patterns in your React components immediately.

Frequently Asked Questions about composition-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce boolean prop proliferation in React components?

Reduce boolean prop proliferation in React components by applying composition patterns like compound components and headless hooks. These patterns share implicit state and provide flexible UI APIs without cluttering the component interface.

What is the compound components pattern in React?

The compound components pattern in React allows a set of components to share implicit state implicitly. This creates clean composition and flexible APIs for reusable component libraries without passing redundant props down the tree.

How do I use headless hooks and render props for flexible React UI?

Use headless hooks and render props in React to separate logic from rendering. This pattern provides flexible UI structures by exposing state and behavior through functions or hooks rather than dictating the visual output.

When do I need state lifting and controlled components in React?

You need state lifting and controlled components in React to simplify data flow and maximize reuse. This approach structures data architecture cleanly when multiple components need access to the same changing state.

Are there anti-pattern guidance for React component architecture?

Anti-pattern guidance for React component architecture highlights poor design choices like prop drilling and boolean prop explosion. It provides structured pattern definitions and practical code examples to avoid unmaintainable component APIs.