vercel-composition-patterns

Refactor React component libraries using compound components and context-driven composition.

110|3|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/HorusGoul/eslint-plugin-react-render-types --skill vercel-composition-patterns-horusgoul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/HorusGoul/eslint-plugin-react-render-types/tree/main/.claude/skills/vercel-composition-patterns
Command: npx skills add https://github.com/HorusGoul/eslint-plugin-react-render-types --skill vercel-composition-patterns-horusgoul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Composition patterns for building flexible React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale.

Core Features & Use Cases

  • Avoid Boolean Prop Proliferation by replacing boolean flags with explicit variant components.
  • Use compound components with a shared context to enable flexible, nested composition without prop drilling.
  • Lift state to providers to share UI state across different parts of an application and support design-system style architectures.

Quick Start

Refactor your codebase by introducing explicit variant components and compound providers to start applying patterns immediately.

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?

Compound components use a shared context to enable flexible, nested composition without prop drilling. This React pattern allows you to lift state to providers, sharing UI state across different parts of an application to support design-system style architectures.

What is the best way to scale a React component library?

The best way to scale a React component library is by applying composition patterns like explicit variant components and compound providers. This approach eliminates boolean prop proliferation and enforces architecture, state-management, and React 19 API guidelines across teams.

Does this React composition approach work with React 19 APIs?

Yes, this composition approach enforces React 19 API guidelines. It specifically directs you to avoid forwardRef where unnecessary and replaces useContext with the new use() hook for managing shared context in compound components.

How do I refactor a large React codebase to use explicit variants?

To refactor a large React codebase, introduce explicit variant components and compound providers to start applying composition patterns immediately. This eliminates boolean flags and lifts state to providers for a more reusable design-system API.

When should I not use boolean flags in React design systems?

You should not use boolean flags in React design systems when building scalable component libraries. Boolean prop proliferation creates complex, hard-to-maintain APIs; replacing them with explicit variants and compound components ensures codebases remain manageable as they scale.