vercel-composition-patterns

Refactor React UI libraries with composable components and shared context.

1|1|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/rodrigobranas/formacao_ia_arq_t1_4 --skill vercel-composition-patterns-rodrigobranas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/rodrigobranas/formacao_ia_arq_t1_4/tree/main/mastra-rag/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/rodrigobranas/formacao_ia_arq_t1_4 --skill vercel-composition-patterns-rodrigobranas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Boolean prop proliferation and rigid component architectures make UI libraries hard to scale and maintain. This guide promotes composable patterns and shared context to unlock flexible, reusable APIs.

Core Features & Use Cases

  • Avoid boolean prop proliferation by using compound components, lifting state, and composing internals to enable scalable UI libraries.
  • Support render props, contextual providers, and explicit variants to design flexible component APIs.
  • Use in refactoring, design systems, and large React apps to improve maintainability and reusability.
  • Real-world example: reorganize a monolithic component into a framework of Frame/Input/Footer and subcomponents with a shared context to enable outside UI to access state.

Quick Start

Refactor a component that uses multiple boolean props into explicit variant components using a shared Composer frame and 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 avoid boolean prop proliferation in React components?

Avoid boolean prop proliferation by refactoring monolithic React components into explicit variant components using compound components, lifting state, and a shared context to enable scalable UI libraries.

When do I need compound components and shared context in React?

You need compound components and shared context when building or refactoring design systems and large React apps to improve maintainability and allow outside UI to access internal state.

What is the best way to design flexible React component APIs?

The best way to design flexible React component APIs is by using composable patterns, contextual providers, render props, and explicit variants to prevent rigid architectures and render-prop sprawl.

Does this React composition guide work with React 19?

Yes, the guidance aligns with React 19 API usage by applying the use() pattern to manage shared context within compound components and explicit variants.

How do I refactor a monolithic React component into a framework of subcomponents?

Refactor a monolithic component into a framework of Frame, Input, and Footer subcomponents using a shared Composer frame and context to enable explicit variants and outside state access.