vercel-composition-patterns

Standardize React component patterns using compound components and context providers.

Updated Jan 7, 2024
One-click install
npx skills add https://github.com/angelriera-dev/angelriera-dev.github.io --skill vercel-composition-patterns-angelriera-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/angelriera-dev/angelriera-dev.github.io/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/angelriera-dev/angelriera-dev.github.io --skill vercel-composition-patterns-angelriera-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Replace boolean prop proliferation in React components with scalable, composable architectures using compound components, context providers, and explicit variants.

Core Features & Use Cases

  • Compound components with shared context enable flexible composition without prop drilling
  • State lifting into providers to allow cross-component state sharing and reuse
  • Explicit variant components (e.g., ThreadComposer, EditMessageComposer, ForwardMessageComposer) instead of boolean-driven modes, plus guidance for React 19 API changes

Quick Start

Move from a monolithic Composer with many booleans to explicit variants like ThreadComposer, EditMessageComposer, and ForwardMessageComposer, each wired to a provider and a frame-based UI.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I replace boolean prop proliferation in React components?

Replace boolean prop proliferation in React components by adopting composable architectures using compound components, explicit variants, and context providers to share state without prop drilling.

What is the best way to manage shared state in compound components without prop drilling?

Manage shared state in compound components by lifting it into context providers, enabling flexible cross-component composition and reuse without prop drilling or boolean-driven modes.

How do I refactor a monolithic React component into explicit variants?

Refactor a monolithic React component into explicit variants like ThreadComposer or EditMessageComposer, wiring each to a provider and frame-based UI instead of boolean-driven modes.

Does React 19 change how context providers are used for state management?

React 19 API guidance recommends using use() over useContext for context providers, enforcing provider-based state patterns to standardize scalable React component architectures.

When should I use explicit variant components instead of boolean-driven modes?

Use explicit variant components instead of boolean-driven modes during refactoring and library design to ensure scalable, composable APIs across architecture and state management changes.

Can I apply composition patterns to scale React component libraries?

Apply composition patterns to scale React component libraries by enforcing frontmatter metadata, rule guidance, and provider-based state patterns for safe, composable APIs.