vercel-composition-patterns

Refactor React components using composition patterns to reduce boolean props.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/sadie100/claude-dotfiles --skill vercel-composition-patterns-sadie100
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/sadie100/claude-dotfiles/tree/main/skills/vercel-composition-patterns
Command: npx skills add https://github.com/sadie100/claude-dotfiles --skill vercel-composition-patterns-sadie100

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides guidelines for refactoring React components to avoid boolean prop proliferation and improve maintainability through the use of composition patterns.

Core Features & Use Cases

  • Avoid Boolean Prop Proliferation: Use composition instead of boolean props to customize behavior.
  • Compound Components: Structure complex components as compound components with shared context.
  • State Management: Lift state into provider components and define clear context interfaces for dependency injection.
  • Implementation Patterns: Use children for composition instead of render props and create explicit component variants.
  • React 19 APIs: Adapt to React 19+ API changes for cleaner component definitions and context usage.
  • Use Case: Refactor a large React application to improve scalability and maintainability by applying these composition patterns.

Quick Start

Use the vercel-composition-patterns skill to refactor your React components and apply the provided composition patterns.

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, use composition patterns like compound components and children for composition instead of passing multiple boolean props to customize behavior. This improves maintainability by creating explicit component variants.

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

The best way to structure complex React components for maintainability is using compound components with shared context. Lift state into provider components and define clear context interfaces for dependency injection rather than relying on render props.

How do I refactor a large React application to improve scalability?

Refactor a large React application to improve scalability by applying composition patterns like compound components and explicit variants. Lift state into providers and use children for composition instead of boolean props to customize behavior and improve maintainability.

Does React 19 support new composition patterns for component architecture?

React 19 supports new composition patterns by providing API changes for cleaner component definitions and context usage. You can adapt your component architecture to these APIs to lift state into providers and define clear context interfaces for dependency injection.

When should I use compound components instead of render props in React?

Use compound components instead of render props in React when you want to improve maintainability and avoid boolean prop proliferation. Compound components with shared context allow you to lift state into providers and use children for composition rather than render props.

Can I use composition patterns for state management in React 19?

You can use composition patterns for state management in React 19 by lifting state into provider components and defining clear context interfaces for dependency injection. This approach replaces boolean prop proliferation and improves overall component architecture.