vercel-composition-patterns

Guide React component architecture refactoring using composition patterns and React 19 APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of building maintainable and scalable React component architectures, particularly when dealing with numerous boolean props, prop drilling, and the need for reusable component libraries.

Core Features & Use Cases

  • Component Architecture: Avoids boolean prop proliferation by advocating for explicit component variants and compound components.
  • State Management: Guides on decoupling state logic from UI, defining generic context interfaces for dependency injection, and lifting state into provider components for better accessibility.
  • Implementation Patterns: Recommends using children for composition over render props and creating explicit component variants for clarity.
  • React 19 APIs: Covers modern React practices like using use() instead of useContext() and handling refs as regular props.
  • Use Case: Refactor a large, monolithic React component with many conditional rendering paths 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 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 refactor a React component with too many boolean props?

Refactor React components with boolean props by creating explicit component variants and using compound components. This composition pattern avoids conditional rendering paths, making your component library flexible and maintainable.

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

Decouple state management from React UI by defining generic context interfaces and lifting state into provider components. This approach separates state logic from presentation for better accessibility and testing.

How do I use React 19 APIs for context and refs in compound components?

React 19 APIs modernize compound components by using the use() hook instead of useContext() and handling refs as regular props. These practices streamline dependency injection and component architecture.

When should I use children composition over render props in React?

Use children composition over render props in React to build scalable component architectures. This pattern simplifies component APIs, reduces boolean prop proliferation, and creates more maintainable reusable components.

How do I structure scalable React component libraries using composition patterns?

Structure scalable React component libraries using composition patterns by breaking monolithic components into smaller, composable parts. This strategy emphasizes explicit variants and decoupled state management for reusable APIs.