@aj-geddes/react-component-architecture

>

View in AI SkillSafe app
Scanned · no findings
0 downloads
0 stars
0 demos
SKILL.md
namereact-component-architecture
description>

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:

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

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

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/react-component-architecture/verified)](https://skillsafe.ai/skill/@aj-geddes/react-component-architecture/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/react-component-architecture/installs)](https://skillsafe.ai/skill/@aj-geddes/react-component-architecture/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/react-component-architecture/scan)](https://skillsafe.ai/skill/@aj-geddes/react-component-architecture/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@aj-geddes/react-component-architecture/eval)](https://skillsafe.ai/skill/@aj-geddes/react-component-architecture/)