vercel-composition-patterns

Refactor React component libraries by replacing boolean props with composition patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

Core Features & Use Cases

  • Reduce boolean prop proliferation by adopting compound components and explicit variants.
  • Support patterns like render props and context providers to assemble flexible, scalable UI.
  • Includes guidance on React 19 API changes to align with modern React practices.

Quick Start

Begin by replacing boolean props with explicit variant components and a shared provider to orchestrate state.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I scale React components without boolean prop proliferation?

To scale React components without boolean prop proliferation, replace conditional flags with explicit variant components, compound components, and a shared context provider to orchestrate state and assemble flexible UI.

What is the best way to structure a React component library for reuse?

The best way to structure a reusable React component library is to adopt composition patterns, defining explicit variants, generic context interfaces, and provider-based state management compatible with React 19 APIs.

How do context providers and render props work together in React?

Context providers and render props work together by using providers to orchestrate shared state across compound components, while render props pass rendering logic down to assemble flexible, scalable UI structures.

Does this React composition approach work with React 19?

Yes, this React composition approach works with React 19 by defining generic context interfaces and provider-based state management specifically aligned with modern React 19 API changes and practices.

When should I use compound components instead of boolean props?

You should use compound components instead of boolean props when refactoring complex UI elements into a design system, allowing explicit variant components to replace conditional logic and prevent prop API bloat.

Why does my React component architecture break when adding new variants?

Your React component architecture breaks when adding new variants because boolean prop proliferation creates rigid, conditional logic, which should be replaced by scalable composition patterns like explicit variants and context providers.