Skip to content
aj-geddes avatar

React Component Architecture

Reusable React component patterns covering functional components, custom hooks, composition, and typed props, with reference guides.

CCM score
36 of 100
skills.sh installs
688
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers functional components with hooks, custom hooks, composition, higher-order components, and render props patterns
  • Includes a typed Button quick start with variant, size, and disabled props, plus five reference guides in references/
  • Provides a DO and DON'T checklist covering testing, error handling, and avoiding hard-coded configuration values
  • Designed for component library design, large React applications, reusable UI patterns, and performance optimization work

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill react-component-architecture -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

React Component Architecture

Table of Contents

Overview

Build scalable, maintainable React components using modern patterns including functional components, hooks, composition, and TypeScript for type safety.

When to Use

  • Component library design
  • Large-scale React applications
  • Reusable UI patterns
  • Custom hooks development
  • Performance optimization

Quick Start

Minimal working example:

// Button.tsx
import React, { useState, useCallback } from 'react';

interface ButtonProps {
  variant?: 'primary' | 'secondary' | 'danger';
  size?: 'sm' | 'md' | 'lg';
  disabled?: boolean;
  onClick?: () => void;
  children: React.ReactNode;
}

export const Button: React.FC<ButtonProps> = ({
  variant = 'primary',
  size = 'md',
  disabled = false,
  onClick,
  children
}) => {
  const variantStyles = {
    primary: 'bg-blue-500 hover:bg-blue-600',
    secondary: 'bg-gray-500 hover:bg-gray-600',
    danger: 'bg-red-500 hover:bg-red-600'
  };

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Category
Frontend & UI Code
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Similar to React Component Architecture

More Frontend & UI Code