react-component-patterns

Reference React and TypeScript component design patterns for standardized UI development.

6|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/GeneralJerel/chalk-skills --skill react-component-patterns-generaljerel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-component-patterns
Source: https://github.com/GeneralJerel/chalk-skills/tree/main/skills/react-component-patterns
Command: npx skills add https://github.com/GeneralJerel/chalk-skills --skill react-component-patterns-generaljerel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured reference of React + TypeScript component design patterns to standardize UI development.

Core Features & Use Cases

  • Composition over inheritance as the default approach to building UI primitives.
  • Typed Props API design with discriminated unions and polymorphic rendering to ensure valid configurations.
  • Compound components and render-prop patterns to express complex UI without prop drilling.
  • Memoization, forwardRef usage, and controlled vs uncontrolled patterns to optimize performance and usability.
  • Anti-pattern guidance to avoid God components, excessive boolean props, and unsafe effects.

Quick Start

Review the guide and begin applying React + TypeScript patterns to a component to improve composition, type-safety, and reusability.

Frequently Asked Questions about react-component-patterns

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

FAQPage Schema
How do I design a typed Props API for reusable React components?

Design typed Props APIs in React using discriminated unions and polymorphic rendering to ensure valid component configurations. This enforces strict type-safety and prevents invalid prop combinations from compiling.

What's the best way to avoid prop drilling in complex React UI?

Avoid prop drilling in complex React UI by utilizing compound components and render-prop patterns. These methods allow you to express deeply nested UI structures without manually passing props through every component layer.

How does memoization work for optimizing React component performance?

Memoization optimizes React component performance by preventing unnecessary re-renders when props remain unchanged. It should be paired with forwardRef usage and controlled versus uncontrolled patterns to maximize UI reusability and execution speed.

When should I use composition over inheritance in React component design?

Use composition over inheritance as the default approach for building React UI primitives to standardize development. Composition provides safer, more flexible component structures and helps you avoid building rigid God components with excessive boolean props.

What are common React component anti-patterns to avoid?

Common React component anti-patterns to avoid include creating God components, relying on excessive boolean props, and implementing unsafe effects. Reviewing structured React and TypeScript pattern guides helps identify and eliminate these unsafe design choices.