vercel-composition-patterns

Apply React composition patterns to replace boolean props with variant components.

18|2|Updated May 14, 2026
One-click install
npx skills add https://github.com/daloyjs/daloy --skill vercel-composition-patterns-daloyjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/daloyjs/daloy/tree/main/website/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/daloyjs/daloy --skill vercel-composition-patterns-daloyjs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactoring React components often leads to boolean prop proliferation and rigid, brittle architectures. This Skill provides guidance on using compound components, context providers, and explicit component variants to build scalable, reusable UI primitives.

Core Features & Use Cases

  • Explicit variant components (ThreadComposer, EditMessageComposer, ForwardMessageComposer) to replace complex boolean prop configurations.
  • Compound components with shared context to avoid prop drilling and enable flexible composition.
  • Provider-driven state management to lift state and enable UI components to be reused across different providers.
  • React 19 API guidance for modern context usage and ref handling.

Quick Start

Use explicit variant components like ThreadComposer, EditMessageComposer, and ForwardMessageComposer with a shared provider to compose Frame, Input, and Footer in place of boolean props.

Frequently Asked Questions about vercel-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?

To reduce boolean prop proliferation in React, replace complex conditional props with explicit variant components like ThreadComposer or EditMessageComposer. This Skill guides you in building scalable UI primitives using compound components and context providers.

What is the best way to manage shared state across compound components in React?

The best way to manage shared state across compound components is through provider-driven state management. By lifting state into context providers, you avoid prop drilling and enable flexible composition of reusable UI components across different providers.

Does this React composition patterns approach work with React 19?

Yes, this composition patterns approach works with React 19. It enforces modern React 19 API practices for context usage and ref handling, ensuring your component library architecture remains compatible with the latest framework updates.

How do I use explicit variants instead of boolean props for UI primitives?

To use explicit variants instead of boolean props for UI primitives, create distinct component variants like ForwardMessageComposer. You then compose Frame, Input, and Footer elements within a shared provider to replace complex boolean prop configurations.

When should I use context providers for React composition?

You should use context providers for React composition when building component libraries that rely on compound components. Provider-driven state management lifts state to avoid prop drilling and enables flexible composition of UI components across different contexts.