react-patterns

Document React 19.2 design patterns for components, hooks, and state management.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tuyenht/Antigravity-Core --skill react-patterns-tuyenht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/tuyenht/Antigravity-Core/tree/main/.agent/skills/react-patterns
Command: npx skills add https://github.com/tuyenht/Antigravity-Core --skill react-patterns-tuyenht

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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

Core Features & Use Cases

  • Component Design: Principles for structuring components (Server, Client, Presentational, Container).
  • Hook Patterns: Guidance on when and how to extract custom hooks for reusability.
  • State Management: Strategies for choosing the right state management solution based on complexity.
  • Performance Optimization: Techniques for identifying and resolving performance bottlenecks.
  • Error Handling: Best practices for implementing error boundaries and recovery mechanisms.
  • TypeScript Integration: Typing strategies for props and common React patterns.
  • Testing: Principles for unit, integration, and E2E testing of React applications.
  • Anti-Patterns: Common pitfalls to avoid in React development.
  • Use Case: A senior developer needs to refactor a complex React application to improve maintainability and performance, ensuring adherence to modern best practices.

Quick Start

Explain the principles of Server Components in React 19.2.

Frequently Asked Questions about react-patterns

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

FAQPage Schema
What are the best practices for React 19.2 component architecture?

Best practices for React 19.2 component architecture involve structuring components by role, specifically separating Server, Client, Presentational, and Container components to ensure scalable and maintainable application boundaries.

How do I optimize re-render performance in modern React applications?

To optimize re-render performance in React, apply modern design patterns that identify and resolve bottlenecks, utilizing specific compiler integration principles and hook strategies to prevent unnecessary component tree updates.

When should I extract custom hooks in React?

You should extract custom hooks in React when logic needs reusability across multiple components; identifying the right extraction patterns ensures cleaner architecture and prevents common state management anti-patterns.

How do I integrate TypeScript with modern React design patterns?

TypeScript integration with React patterns requires applying specific typing strategies for component props and hooks, ensuring type-safe state management and robust error handling boundaries throughout the application.

What are common anti-patterns to avoid when building scalable React apps?

Common React anti-patterns to avoid include mismanaging component state complexity, improperly structuring Server and Client components, and neglecting error boundaries, all of which degrade maintainability and performance.

Does this guide cover testing strategies for React server components?

Yes, the guide covers testing strategies for React server components, outlining principles for unit, integration, and E2E testing to validate modern component architecture and hook implementations effectively.