react-patterns

Guide React component design, custom hooks, state management, and performance optimization.

7|2|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/LuisSambrano/antigravity-config --skill react-patterns-luissambrano
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/LuisSambrano/antigravity-config/tree/main/skills/3-web/react-patterns
Command: npx skills add https://github.com/LuisSambrano/antigravity-config --skill react-patterns-luissambrano

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to modern React patterns and best practices, helping developers build more robust, maintainable, and performant applications.

Core Features & Use Cases

  • Component Design: Understand principles for structuring components (Server, Client, Presentational, Container).
  • Hook Patterns: Learn when and how to extract custom hooks for reusability and maintainability.
  • State Management: Guidance on selecting the right state management solution based on complexity.
  • Performance Optimization: Strategies to identify and address performance bottlenecks.
  • TypeScript Best Practices: Typing for props, events, and common React scenarios.
  • Use Case: A developer is unsure about the best way to manage form state in a complex React application. They can consult this Skill for guidance on useForm hooks and state management solutions like Zustand or Redux Toolkit.

Quick Start

Use the react-patterns skill to understand when to extract a custom hook.

Frequently Asked Questions about react-patterns

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

FAQPage Schema
How do I extract custom hooks for reusability in React?

Extract custom hooks in React by identifying repeated stateful logic across components and moving it into a isolated function. This Skill guides you on exactly when to extract hooks to improve reusability and maintainability.

What is the best way to manage complex form state in React?

The best way to manage complex form state in React involves evaluating dedicated state management solutions. This Skill provides guidance on selecting tools like Zustand or Redux Toolkit and structuring useForm hooks.

How do I optimize React performance and address bottlenecks?

Optimize React performance by applying targeted composition and rendering strategies. This Skill outlines specific techniques to identify performance bottlenecks and implement scalable component design.

How should I structure Server and Client components in React 19?

Structure React 19 components by separating Server and Client responsibilities based on data fetching and interactivity needs. This Skill covers modern component design principles for scalable applications.

What are the TypeScript best practices for typing React props and events?

TypeScript best practices for React involve defining clear interfaces for props and events to ensure type safety. This Skill details how to apply TypeScript typing to common React scenarios.

When should I not use a custom hook for state management?

You should avoid custom hooks for state management when a global store is required for shared data across distant components. This Skill helps determine when to use composition or dedicated state management solutions instead.