vercel-composition-patterns

Installation
Summary

React composition patterns for scaling components and avoiding boolean prop proliferation.

  • Covers four priority categories: component architecture, state management, implementation patterns, and React 19 APIs, each with specific rules and code examples
  • Includes 10+ named patterns addressing compound components, context providers, state lifting, and explicit variants
  • Designed for refactoring bloated components, building reusable libraries, and reviewing component architecture decisions
  • React 19 specific guidance on removing forwardRef and using use() instead of useContext()
SKILL.md

React Composition Patterns

Composition patterns for building flexible, maintainable 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.

When to Apply

Reference these guidelines when:

  • Refactoring components with many boolean props
  • Building reusable component libraries
  • Designing flexible component APIs
  • Reviewing component architecture
  • Working with compound components or context providers

Rule Categories by Priority

Related skills

More from vercel-labs/agent-skills

Installs
170.2K
GitHub Stars
26.5K
First Seen
Jan 26, 2026