vercel-composition-patterns

Design scalable React components using compound components, render props, and context providers.

148|39|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/usenotra/notra --skill vercel-composition-patterns-usenotra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/usenotra/notra/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/usenotra/notra --skill vercel-composition-patterns-usenotra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design scalable React components using composition patterns.

Core Features & Use Cases

  • Enable compound components and shared context to avoid prop drilling.
  • Reduce boolean prop proliferation by composing explicit variants.
  • Facilitate reusable APIs and flexible component libraries across React apps.

Quick Start

To apply this skill, refactor a component library to adopt compound components, context providers, and explicit variants instead of boolean props.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I use React composition patterns to stop prop drilling in a component library?

Use compound components and shared context providers to avoid prop drilling by encapsulating state within a generic context interface, exposing actions and metadata only to subscribed child components.

What is the best way to reduce boolean prop proliferation in scalable React components?

The best way to reduce boolean prop proliferation is refactoring components into explicit variants using compound components, composing discrete UI pieces rather than passing multiple boolean flags to a single monolithic component.

How do render props and compound components work together in React architecture?

Render props and compound components work together by allowing parent components to share generic context state and actions with children, enabling flexible rendering logic and reusable APIs without deeply nested prop passing.

Does this React composition approach work with React 19 API changes like the use hook?

Yes, this architecture aligns with React 19 API changes by utilizing the native use hook instead of useContext and removing forwardRef wrappers, relying entirely on provider-based context interfaces for state and action distribution.

When should I refactor my React app to use a provider-based context architecture?

Refactor to a provider-based context architecture when your component library struggles with scaling, boolean prop proliferation, or rigid APIs, and needs flexible composition across multiple React apps via explicit variants.