vercel-composition-patterns

Standardize React component composition patterns to reduce boolean prop proliferation.

Updated Nov 16, 2025
One-click install
npx skills add https://github.com/daniel-dihardja/menuyukti --skill vercel-composition-patterns-daniel-dihardja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/daniel-dihardja/menuyukti/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/daniel-dihardja/menuyukti --skill vercel-composition-patterns-daniel-dihardja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React composition patterns help teams avoid boolean prop proliferation and build flexible, reusable component libraries, reducing complexity when refactoring and scaling.

Core Features & Use Cases

  • Use compound components with shared context to avoid prop drilling and enable flexible composition.
  • Create explicit variants (ThreadComposer, EditMessageComposer, ForwardMessageComposer) instead of boolean prop flags.
  • Lift state into providers to share state across the UI, including outside the main frame, enabling modular tooling.

Quick Start

Create an explicit ThreadComposer variant for a channel that uses provider-based state management with a shared Frame and Input.

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 reusable React components?

To avoid boolean prop proliferation in React components, replace conditional flags with explicit variants and compound components, standardizing composition patterns to reduce complexity when scaling UI libraries.

What is the best way to stop prop drilling in React component architecture?

The best way to stop prop drilling in React component architecture is using compound components with shared context providers, allowing state to be lifted and accessed directly without passing props through every layer.

How do I create explicit variants for React components instead of using boolean flags?

Create explicit React variants like ThreadComposer or EditMessageComposer to handle specific UI configurations, replacing boolean flags with dedicated components that encapsulate unique logic and shared context.

When should I lift React state into context providers for UI composition?

Lift React state into context providers when you need to share state across modular components outside the main frame, enabling flexible UI composition and tooling access without prop drilling.

Does this React composition pattern work for refactoring existing components?

Yes, these React composition patterns apply to refactoring existing components across codebases, providing concrete UI primitives like Frame and Input alongside guidance to standardize architecture and reduce complexity.