vercel-composition-patterns

Review React composition patterns to reduce prop drilling and manage state.

Updated May 30, 2026
One-click install
npx skills add https://github.com/kaiomaced0/hackamarh --skill vercel-composition-patterns-kaiomaced0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/kaiomaced0/hackamarh/tree/main/front-gestao/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/kaiomaced0/hackamarh --skill vercel-composition-patterns-kaiomaced0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of complex React component architecture by providing optimized composition patterns, reducing prop drilling, and enhancing maintainability.

Core Features & Use Cases

  • Avoid Boolean Prop Proliferation: Offers guidance on using composition instead of boolean props to manage component behavior.
  • Use Compound Components: Provides patterns for structuring complex components as compound components with shared context.
  • State Management: Includes best practices for lifting state into provider components and defining generic context interfaces for dependency injection.
  • Implementation Patterns: Delivers techniques for creating explicit component variants and preferring children over render props.
  • React 19 APIs: Covers React 19+ API changes such as replacing forwardRef with use() and useContext() with use().

Quick Start

Run the vercel-composition-patterns skill to review the document on React composition patterns.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I reduce prop drilling in complex React component architecture?

To reduce prop drilling in React component architecture, you should lift state into provider components and utilize generic context interfaces for dependency injection. This approach enhances maintainability by avoiding deeply nested prop chains.

What is the best way to manage multiple component behaviors without boolean prop proliferation?

The best way to avoid boolean prop proliferation is by using composition patterns to create explicit component variants. Instead of stacking boolean props, structure your components to prefer children over render props for clearer behavior management.

How do compound components improve React state management?

Compound components improve React state management by structuring complex components with shared context. This pattern allows individual parts of a component to communicate and share state internally without exposing implementation details to the parent.

Can I use React 19 APIs to replace forwardRef and useContext?

Yes, you can replace forwardRef and useContext with the new use() API in React 19. This modern API change simplifies component architecture by streamlining how components consume context and handle refs.

Does this React composition patterns approach work for large scale applications?

Yes, these React composition patterns target developers working on complex applications by enhancing scalability and maintainability. The provided implementation patterns ensure your component architecture remains robust as your application grows.

When should I prefer children over render props in React component architecture?

You should prefer children over render props when designing explicit component variants to simplify your React component architecture. This composition pattern reduces complexity and makes your components easier to read and maintain.