Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

React Component Architecture

  • 607 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

react-component-architecture is a Claude Code skill that teaches reusable React and TypeScript component patterns, hooks, and composition rules for developers building maintainable UI layers and component libraries.

About

react-component-architecture is a Claude Code skill from aj-geddes/useful-ai-prompts that codifies scalable React UI design with functional components, hooks, composition, and TypeScript type safety. The skill includes reference guides, quick-start patterns, and best practices for component library design and large-scale React applications. Developers reach for react-component-architecture when scaffolding a new UI layer, refactoring monolithic components, or establishing team conventions for props, state, and composition. It focuses on maintainable structure rather than visual styling, making it a fit during greenfield builds and ongoing refactors alike.

  • Functional components with TypeScript props for variants, sizes, and disabled states
  • Composition patterns and custom hooks for scalable libraries and large apps
  • Quick-start Button example with variant and size style maps
  • Reference guides for performance optimization and reusable UI patterns
  • Explicit When to Use list: libraries, large-scale apps, hooks, and perf work

React Component Architecture by the numbers

  • 607 all-time installs (skills.sh)
  • Ranked #562 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill react-component-architecture

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs607
repo stars305
Security audit3 / 3 scanners passed
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you structure scalable React components with TypeScript?

Install this when you want reusable React + TypeScript component patterns, hooks, and composition rules for a maintainable UI layer.

Who is it for?

Frontend developers building React and TypeScript component libraries or large applications that need consistent composition and hook patterns.

Skip if: Teams using Vue, Svelte, or Angular, or projects needing only CSS and visual design guidance should skip react-component-architecture.

When should I use this skill?

A developer asks to design React components, establish a component library, or refactor a React UI layer with hooks and TypeScript.

What you get

Typed React component hierarchy with hooks, composition patterns, and documented UI architecture conventions.

  • Component architecture conventions
  • Typed React component patterns

Files

SKILL.mdMarkdownGitHub ↗

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'
  };

  const sizeStyles = {
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Functional Component with HooksFunctional Component with Hooks
Custom Hooks PatternCustom Hooks Pattern
Composition PatternComposition Pattern
Higher-Order Component (HOC)Higher-Order Component (HOC)
Render Props PatternRender Props Pattern

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Related skills

FAQ

What React patterns does react-component-architecture cover?

react-component-architecture covers functional components, hooks, composition patterns, and TypeScript type safety with reference guides and best practices for component libraries and large React applications.

When should developers use react-component-architecture?

react-component-architecture fits component library design, large-scale React application structure, and refactors where reusable typed components, hooks, and composition rules need consistent team conventions.

Is React Component Architecture safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.