vercel-composition-patterns

Structure React components with compound components and shared context.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing React component states and props, offering patterns to create more flexible, readable, and maintainable codebases.

Core Features & Use Cases

  • Avoids Boolean Prop Proliferation: Replaces numerous boolean props with compositional patterns for clearer component variants.
  • Compound Components: Enables building complex components with shared context, allowing consumers to compose only the pieces they need.
  • State Management Patterns: Guides on decoupling state logic from UI and lifting state into providers for better reusability and dependency injection.
  • React 19 API Adoption: Includes guidance on new React 19 features like use() and direct ref props.
  • Use Case: Refactoring a large, monolithic Composer component with many conditional rendering paths into smaller, composable sub-components and explicit variants.

Quick Start

Apply the vercel-composition-patterns skill to refactor the Composer component to use explicit variants and compound components.

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?

You can replace numerous boolean props with compositional patterns and explicit component variants, reducing complex conditional rendering paths and creating clearer, more maintainable component structures.

What is the best way to structure complex React components for maintainability?

The best way to structure complex React components for maintainability is utilizing compound components with shared context, allowing consumers to compose only the specific pieces they need while decoupling state logic from the UI.

How do I decouple state management logic from React UI components?

Decouple state management from React UI components by lifting state into providers and leveraging dependency injection, which enhances reusability and separates state logic from rendering concerns.

Does this React composition pattern support React 19 API changes?

Yes, these React composition patterns support React 19 API changes by incorporating new features like the use() hook and direct ref props to enable cleaner component definitions.

How do I refactor a monolithic React component into smaller sub-components?

Refactor a monolithic React component by breaking it down into smaller, composable sub-components using shared context and explicit variants, replacing multiple conditional rendering paths with compound component structures.