
React Component Architecture
Gives you patterns for building React components the right way: functional components with hooks, composition over inheritance, TypeScript props, and custom hooks. The reference guides cover practical implementations like HOCs and render props, which is helpful when you're setting up a component library or trying to keep a large React app from turning into spaghetti. It's opinionated toward modern React (no class components here), which is good because that's what you should be writing anyway. Best for greenfield projects or refactoring existing codebases where you want consistent patterns across your team.
- skills.sh installs
- 683
- GitHub stars
- 379
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill react-component-architecture --agent claude-codeInstalls into .claude/skills of the current project.
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'
};
Sponsors
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Frontend Development, Code Review & Quality, AI & Agent Building, Design & UI/UX
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Docker Containerization681
- Agile Sprint Planning677
- Log Analysis674
- Security Compliance Audit673
- Project Estimation670
- Gitlab Cicd Pipeline669
- Websocket Implementation668
- Requirements Gathering663
- Image Optimization662
- Ruby Rails Application660
- Api Rate Limiting647
- Internationalization I18n642
- Information Architecture641
- Backup Disaster Recovery626
- Github Actions Workflow626
- Color Accessibility624
- Fastapi Development624
- Static Code Analysis622
- Unit Testing Framework622
- Aws Lambda Functions619
- User Research Analysis618
- Vulnerability Scanning617
- Data Encryption616
- Api Authentication612