vercel-composition-patterns

Define React composition patterns to reduce boolean prop proliferation.

1|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/FnSK4R17s/chakravarti-cli --skill vercel-composition-patterns-fnsk4r17s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/FnSK4R17s/chakravarti-cli/tree/main/.agent/skills/vercel-composition-patterns
Command: npx skills add https://github.com/FnSK4R17s/chakravarti-cli --skill vercel-composition-patterns-fnsk4r17s

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React patterns to avoid boolean prop proliferation and enable scalable, reusable component APIs across teams.

Core Features & Use Cases

  • Use compound components with shared context to reduce prop drilling.
  • Implement explicit component variants and provider-based state management for flexible UI libraries.
  • Apply patterns to design systems and cross-team React projects, including React 19 API changes.

Quick Start

Start by building a minimal React component library that demonstrates explicit variants and a provider-based UI.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
What are React composition patterns and when should I use them?

React composition patterns are techniques like compound components and render props used to build flexible, reusable component APIs. You should use them to reduce boolean prop proliferation and simplify state management in large design systems or cross-team projects.

How do I avoid prop drilling in React without passing boolean props everywhere?

To avoid prop drilling and boolean prop proliferation, apply provider-based state lifting and compound components with shared context. These composition patterns enable explicit component variants and generic context interfaces for flexible UI libraries.

Can I use compound components and context providers with React 19 API changes?

Yes, these composition patterns explicitly cover React 19 API adjustments. You can implement provider-based state management and generic context interfaces using compound components that remain compatible with React 19 updates.

What's the best way to structure a React design system for cross-team reuse?

The best way to structure a React design system is by applying explicit variants and context providers. This architecture reduces prop drilling and enables scalable, reusable component APIs across multiple teams.

Why does my React component library have too many boolean props for UI variants?

Your React component library has boolean prop proliferation because it lacks explicit variants and robust composition patterns. Implementing render props and provider-based state management enforces generic context interfaces to resolve this issue.