vercel-composition-patterns

Guide React component library refactoring with composition patterns and explicit variants.

5|1|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/Tristan578/project-forge --skill vercel-composition-patterns-tristan578
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/Tristan578/project-forge/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/Tristan578/project-forge --skill vercel-composition-patterns-tristan578

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Promotes scalable React UI architectures by teaching composition patterns that reduce prop proliferation and enable reusable APIs.

Core Features & Use Cases

  • Guidance on using compound components, lifting state, and context to avoid prop drilling.
  • Patterns for explicit variants (e.g., ThreadComposer, EditMessageComposer, ForwardMessageComposer) and separation of concerns.
  • Practical migration guidance for React 19 APIs including use() and removal of forwardRef.

Quick Start

Refactor an existing component library to replace boolean props with explicit variants and a provider-based state model.

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?

Reduce boolean prop proliferation in React by applying explicit variant patterns and compound components to separate concerns, creating scalable and reusable UI APIs.

What is the best way to avoid prop drilling in React component libraries?

Avoid prop drilling in React by lifting state and using context providers, allowing parent components to share state implicitly with children without passing props manually.

How do I migrate React context usage to React 19 APIs?

Migrate React context to React 19 by replacing useContext with the use() hook and removing forwardRef wrappers, aligning components with modern React 19 practices.

When should I use compound components in React?

Use compound components in React when building flexible, reusable UI APIs that require explicit variants and provider-based state models to manage complex component interactions.

Does this React refactoring approach work without external dependencies?

Yes, this React refactoring approach works without external dependencies, applying composition patterns natively to restructure component libraries and build scalable UI architectures.