vercel-composition-patterns

Guide React component architecture with composition patterns and React 19 APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the complexity of building maintainable and scalable React components by providing patterns to avoid prop proliferation and improve code organization.

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: Includes guidance on new APIs like use() and handling refs.
  • Use Case: Refactor a large, monolithic React component with many conditional props into a set of smaller, composable components that are easier to understand, test, and maintain.

Quick Start

Apply the vercel-composition-patterns skill to refactor the UserProfileCard component to use 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 refactor a monolithic React component to avoid prop proliferation?

Break down large React components using compound components and explicit variants. This composition technique reduces conditional prop complexity, making individual components easier to understand, test, and maintain.

What is the compound components pattern in React?

The compound components pattern is a React composition technique that allows related UI parts to share implicit state while remaining decoupled. It builds scalable component architectures by avoiding boolean prop proliferation and organizing code better.

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

Decouple state from UI in React by defining generic context interfaces and lifting state into providers. This strategy separates data management logic from rendering concerns, reducing component complexity and improving maintainability.

Does this React composition guidance include React 19 API changes?

Yes, the composition guidelines address React 19 API changes. They provide specific implementation patterns for modern development practices, including guidance on using the new use() hook and handling refs correctly.

What is the best way to create explicit component variants in React?

The best way to create explicit component variants is to use specific component structures instead of conditional boolean props. This composition pattern ensures clearer APIs, prevents prop drilling, and makes React architecture more predictable.