vercel-composition-patterns

Guide React component architecture with compound components and explicit variants.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity and maintainability issues in React component architecture, particularly those arising from boolean prop proliferation and monolithic component designs.

Core Features & Use Cases

  • Component Architecture: Guides on avoiding boolean prop proliferation and using compound components for better composition.
  • State Management: Strategies for decoupling state from UI, defining generic context interfaces, and lifting state into providers.
  • Implementation Patterns: Best practices for creating explicit component variants and preferring children over render props.
  • React 19 APIs: Covers new APIs like use() and simplified ref handling.
  • Use Case: Refactor a large UserProfile component that uses many boolean flags (e.g., isEditing, showAvatar, isDarkMode) into a more composable structure using compound components and explicit variants.

Quick Start

Apply the React composition patterns skill to refactor a component that uses too many 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 avoid boolean prop proliferation in React components?

Refactor React components with too many boolean flags by adopting compound components and explicit variants. This approach replaces flags like isEditing with composable structures, making the architecture maintainable.

What is the best way to decouple state management from UI in React 19?

Decouple state from UI in React 19 by defining generic context interfaces and lifting state into providers. This pattern uses modern APIs like use() for effective state management without prop drilling.

When should I use compound components instead of render props?

Use compound components when you need flexible composition without render props. Preferring children over render props simplifies the component architecture and reduces boolean prop proliferation for scalable React designs.

Can I use the React context API for scalable component architecture?

Yes, you can build scalable React component architecture using the context API. By defining generic context interfaces and lifting state into providers, you effectively decouple state from UI components.

Does this React composition pattern work with React 19 API changes?

Yes, these React composition patterns incorporate React 19 API changes. They cover new APIs like the use() hook and simplified ref handling to ensure modern, maintainable component architecture.