react-composition

Verified·Scanned 2/19/2026

React composition patterns for scalable component architecture. Use when refactoring components with boolean prop proliferation, building flexible component libraries, designing reusable component APIs, or working with compound components and context providers.

from clawhub.ai·v1.0·9.7 KB·0 installs
Scanned from 1.0.0 at 5c9a14e · Transparency log ↗
$ vett add clawhub.ai/wpank/react-composition

React Composition Patterns

Composition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals.

What's Inside

  • Avoid boolean prop proliferation (CRITICAL)
  • Compound components with shared context (HIGH)
  • Generic context interface / dependency injection (HIGH)
  • State lifting into providers (HIGH)
  • Explicit variant components (MEDIUM)
  • Children over render props (MEDIUM)
  • Decision guide for choosing the right pattern

When to Use

  • Refactoring components with many boolean props
  • Building reusable component libraries
  • Designing flexible component APIs
  • Working with compound components or context providers

Installation

npx add https://github.com/wpank/ai/tree/main/skills/frontend/react-composition

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install react-composition

Manual Installation

Cursor (per-project)

From your project root:

mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/frontend/react-composition .cursor/skills/react-composition

Cursor (global)

mkdir -p ~/.cursor/skills
cp -r ~/.ai-skills/skills/frontend/react-composition ~/.cursor/skills/react-composition

Claude Code (per-project)

From your project root:

mkdir -p .claude/skills
cp -r ~/.ai-skills/skills/frontend/react-composition .claude/skills/react-composition

Claude Code (global)

mkdir -p ~/.claude/skills
cp -r ~/.ai-skills/skills/frontend/react-composition ~/.claude/skills/react-composition

Related Skills

  • composition-patterns — Extended examples with detailed code patterns

Part of the Frontend skill category.