react-patterns

Guide modern React component design, hook patterns, and performance optimization.

Updated Sep 6, 2025
One-click install
npx skills add https://github.com/Khaledaun/Yalla-london --skill react-patterns-khaledaun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/Khaledaun/Yalla-london/tree/main/.claude/skills/react-patterns
Command: npx skills add https://github.com/Khaledaun/Yalla-london --skill react-patterns-khaledaun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to modern React patterns and principles, helping developers build robust, scalable, and performant applications.

Core Features & Use Cases

  • Component Design: Learn best practices for structuring components (Server, Client, Presentational, Container).
  • Hook Patterns: Understand when and how to extract custom hooks for reusability and maintainability.
  • State Management: Guidance on choosing the right state management solution based on complexity.
  • Performance Optimization: Strategies for identifying and resolving performance bottlenecks.
  • TypeScript Best Practices: Typing for props, events, and common React patterns.
  • Use Case: A developer looking to refactor a large React application can use this Skill to understand modern patterns for component composition, state management, and performance optimization, leading to a cleaner and more maintainable codebase.

Quick Start

Review the principles for component design and hook extraction in React.

Frequently Asked Questions about react-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure React components for a scalable production application?

To structure scalable React components, categorize them into Server, Client, Presentational, and Container components. This design pattern separates data fetching logic from rendering, resulting in a maintainable and robust application architecture.

When should I extract custom hooks in React?

Extract custom React hooks when you need to reuse stateful logic across multiple components. Isolating this behavior improves maintainability, simplifies testing, and keeps your component code clean and focused.

What is the best way to choose a state management solution in React?

The best way to choose a React state management solution is by evaluating your application's complexity. This ensures you select the right approach for your scaling needs, avoiding unnecessary overhead in simpler applications.

How do I optimize React performance and resolve bottlenecks?

Optimize React performance by applying targeted strategies to identify and resolve rendering bottlenecks. Focusing on modern patterns and composition prevents unnecessary re-renders, resulting in a faster, more performant application.

Does this React guide cover TypeScript best practices for props and events?

Yes, this guide covers TypeScript best practices including typing for props, events, and common React patterns. Applying these typing standards ensures type safety and helps catch errors during development.

What are common React anti-patterns I should avoid in production?

Common React anti-patterns to avoid include improper hook extraction and poor component composition. Recognizing these anti-patterns helps you refactor large applications effectively, leading to a cleaner and more maintainable codebase.