From aj-geddes-useful-ai-prompts-4
Designs scalable React components using functional components, hooks, composition patterns, and TypeScript. For building reusable component libraries and maintainable UI systems.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:react-component-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Build scalable, maintainable React components using modern patterns including functional components, hooks, composition, and TypeScript for type safety.
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)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Functional Component with Hooks | Functional Component with Hooks |
| Custom Hooks Pattern | Custom Hooks Pattern |
| Composition Pattern | Composition Pattern |
| Higher-Order Component (HOC) | Higher-Order Component (HOC) |
| Render Props Pattern | Render Props Pattern |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Provides React composition patterns for refactoring boolean prop-heavy components, building compound components, context providers, and scalable APIs.
Writes modern React components using TypeScript, hooks, Tailwind CSS, and best practices. Generates functional components, custom hooks, and composition patterns for performant UIs.
Guides React development with patterns for hooks, composition, state management, performance optimization, and TypeScript best practices.