vercel-composition-patterns

Guide React component composition with compound components and explicit variants.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/HiroyukiMakita/dev-kintone-plugin --skill vercel-composition-patterns-hiroyukimakita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/HiroyukiMakita/dev-kintone-plugin/tree/main/.opencode/skills/vercel-composition-patterns
Command: npx skills add https://github.com/HiroyukiMakita/dev-kintone-plugin --skill vercel-composition-patterns-hiroyukimakita

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 components by providing patterns to avoid common pitfalls like boolean prop proliferation and to enable flexible composition.

Core Features & Use Cases

  • Component Architecture: Patterns for structuring components to avoid unmanageable conditional logic and enable flexible composition.
  • State Management: Techniques for lifting state and managing shared context across composed components.
  • Implementation Patterns: Specific methods for creating explicit component variants and preferring children over render props.
  • React 19 APIs: Guidance on newer React APIs for cleaner component definitions.
  • Use Case: Refactoring a large component with numerous boolean flags into a set of smaller, composable components that are easier to understand and maintain.

Quick Start

Apply the vercel-composition-patterns skill to refactor the Composer component to avoid boolean prop proliferation.

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 components, refactor conditional flags into smaller composable parts using compound components and explicit variants. This pattern eliminates unmanageable conditional logic, resulting in flexible and maintainable component architectures.

What is the best way to manage shared state across composed React components?

The best way to manage shared state across composed React components is by lifting state and utilizing context. This approach allows parent components to share data seamlessly down the composed tree without excessive prop drilling.

How do I refactor a large React component into reusable component libraries?

To refactor a large React component into reusable libraries, apply composition patterns by breaking down conditional flags into compound components and explicit variants. This establishes maintainable component architecture and scalable design systems.

Can I use React 19 APIs to build scalable component architectures?

Yes, you can build scalable component architectures using React 19 APIs. Leveraging the `use()` hook and regular `ref` props enables cleaner component definitions and more flexible state management within your composition patterns.

When should I prefer children over render props in React component architecture?

You should prefer children over render props in React component architecture to achieve cleaner and more readable component compositions. This pattern simplifies component definitions and reduces the complexity of passing functions as props.