vercel-composition-patterns

Apply scalable composition patterns to React component architectures and APIs.

105|12|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/tmcfarlane/oh-my-cursor --skill vercel-composition-patterns-tmcfarlane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/tmcfarlane/oh-my-cursor/tree/main/skills/vercel-composition-patterns
Command: npx skills add https://github.com/tmcfarlane/oh-my-cursor --skill vercel-composition-patterns-tmcfarlane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the challenge of prop proliferation and brittle APIs in React by advocating scalable composition patterns, enabling cleaner, reusable component architectures.

Core Features & Use Cases

  • Provides guidelines for using compound components, lifting state, and context-based APIs.
  • Helps teams design reusable component libraries and robust APIs that scale with project size.
  • Use Case: refactor a family of related components to a cohesive composition model using slots and context to share state and behavior.

Quick Start

Identify a component group that benefits from composition and implement a parent component that renders subcomponents via props or context.

Frequently Asked Questions about vercel-composition-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop prop proliferation in React components?

To stop prop proliferation in React, apply scalable composition patterns like compound components and the context API to share state and behavior without passing redundant props down the component tree.

What is the best way to refactor a React component family into a cohesive API?

The best way to refactor a React component family is implementing a parent component that renders subcomponents via slots and context, establishing a cohesive composition model that enforces flexible, reusable APIs.

When do I need to use compound components in React?

You need compound components in React when building reusable component libraries or designing flexible APIs that scale with project size, ensuring related components share state and behavior cohesively.

Does this React composition approach work with React 19 ecosystems?

Yes, these composition patterns enforce lifting state, render props, and context usage within React 19 ecosystems, ensuring your component architectures and APIs remain scalable and robust across projects.

How do I implement context-based APIs for React component architecture?

You implement context-based APIs by identifying a component group that benefits from composition, then creating a parent component that renders subcomponents via props or context to share state and behavior cleanly.

Why does lifting state help build robust React component libraries?

Lifting state helps build robust React component libraries by solving brittle API challenges, enabling cleaner component architectures that scale with project size and enforce proven composition patterns effectively.