vercel-composition-patterns

Refactor React component libraries using compound components, render props, and context providers.

116|9|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/elophanto/EloPhanto --skill vercel-composition-patterns-elophanto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/elophanto/EloPhanto/tree/main/skills/composition-patterns
Command: npx skills add https://github.com/elophanto/EloPhanto --skill vercel-composition-patterns-elophanto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Composition patterns help you avoid boolean prop proliferation and create scalable, reusable React component libraries. This Skill guides teams to build flexible APIs using compound components, render props, and context providers while accommodating React 19 API changes.

Core Features & Use Cases

  • Provides proven composition patterns for avoiding prop bloat and enabling reusable component architectures.
  • Covers compound components, lifting state, and context-driven APIs to simplify large UI systems.
  • Use Case: refactor a component library to expose a clean, extensible API without exploding props.

Quick Start

Use this Skill to scaffold a React component library that uses compound components and render props to manage state and UI composition.

Frequently Asked Questions about vercel-composition-patterns

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

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

To avoid boolean prop proliferation in React components, apply composition patterns like compound components, render props, and context providers to structure flexible APIs and manage state predictably.

What is the best way to refactor a React component library for scalable APIs?

The best way to refactor a React component library for scalable APIs is using compound components and context-driven APIs to expose extensible interfaces without exploding props or requiring external tooling.

How do compound components and render props work in React?

Compound components and render props work in React by implicitly sharing state through context providers and passing rendering logic via functions, enabling flexible UI composition without prop bloat.

Can I use these React composition patterns with React 19?

Yes, you can use these React composition patterns with React 19, as the approach accommodates React 19 API changes and relies on standard React patterns without requiring external tooling.

When should I use context providers over render props in React?

You should use context providers over render props in React when lifting state for large UI systems that require predictable state management across deeply nested compound components.