vercel-composition-patterns

Refactor React component libraries into explicit variants with shared context providers.

12|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/beeman/solana-mobile-monorepo --skill vercel-composition-patterns-beeman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/beeman/solana-mobile-monorepo/tree/main/.ruler/skills/vercel-composition-patterns
Command: npx skills add https://github.com/beeman/solana-mobile-monorepo --skill vercel-composition-patterns-beeman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to building scalable React codebases by replacing boolean prop proliferation with explicit, reusable patterns.

Core Features & Use Cases

  • Explicit variants: Replace monolithic components with dedicated variants (e.g., ThreadComposer, EditMessageComposer, ForwardMessageComposer) for clearer behavior.
  • Compound components with shared context: Compose UI from small, reusable pieces that share state via a single context, avoiding prop drilling.
  • State lifting and providers: Lift state into providers so that sibling components and external UI can access and modify state without threading props.

Quick Start

Refactor a React component library by introducing explicit variant components and a shared Composer.Provider, then assemble the UI with Frame, Input, and Submit.

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?

To avoid boolean prop proliferation in React components, replace monolithic components with explicit variant components like ThreadComposer or EditMessageComposer, ensuring clearer behavior and safer UI architecture.

How do I use compound components with shared context in React?

Use compound components with shared context in React by composing small, reusable UI pieces that share state via a single context provider, avoiding prop drilling and ensuring scalable component architectures.

Can I use the React 19 use() hook instead of useContext for state management?

Yes, you can use the React 19 use() hook instead of useContext for state management. This Skill enforces React 19 API guidance, applying the use() hook for safer, scalable context provider patterns.

What is the best way to refactor a React component library for scalability?

The best way to refactor a React component library for scalability is introducing explicit variant components and a shared Composer.Provider, then assembling the UI with small pieces like Frame, Input, and Submit.

How do I lift state into providers so sibling components can access it?

Lift state into providers so sibling components and external UI can access and modify state without threading props. This shared provider pattern centralizes state management for safer React architectures.