react-patterns

Guide modern React component design, hooks, state management, and TypeScript practices.

5|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/STier-Ai/stier --skill react-patterns-stier-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/STier-Ai/stier/tree/main/.gemini/skills/react-patterns
Command: npx skills add https://github.com/STier-Ai/stier --skill react-patterns-stier-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges in building scalable and maintainable React applications by providing a comprehensive guide to modern React patterns and principles.

Core Features & Use Cases

  • Component Design: Offers best practices for component types, such as server, client, presentational, and container components.
  • Hooks: Guidance on when and how to use hooks like useLocalStorage, useDebounce, and useFetch.
  • State Management: Discusses different state management solutions like useState, useReducer, Context, and libraries like React Query and SWR.
  • Performance: Provides principles for optimizing React applications, including when to optimize, profiling, and targeted fixes.
  • Error Handling: Explains error boundary usage and error recovery strategies.
  • TypeScript: Offers TypeScript best practices for props typing and common types.
  • Testing: Outlines testing principles for unit, integration, and end-to-end testing.
  • Anti-Patterns: Lists common anti-patterns to avoid in React development.

Quick Start

Execute the skill to review the best practices for React component design.

Frequently Asked Questions about react-patterns

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

FAQPage Schema
What are the best React patterns for scalable component design?

Modern React patterns for scalable component design involve structuring applications using server, client, presentational, and container components. This approach separates concerns to improve maintainability across your application architecture.

How do I choose between useState, useReducer, and Context for React state management?

Choosing the right React state management solution depends on complexity: use useState for local state, useReducer for complex state logic, and Context for sharing state across the tree without prop drilling.

When should I optimize React performance and what profiling techniques should I use?

React performance optimization should be targeted and based on profiling results rather than premature. Apply fixes like memoization only when profiling identifies measurable rendering bottlenecks in your application.

What common React anti-patterns should I avoid in TypeScript projects?

Common React anti-patterns to avoid in TypeScript projects include improper props typing, excessive hook dependencies, and mismanaging component state. Following established TypeScript best practices prevents these structural issues.

How do I implement error boundaries and error recovery strategies in React?

Implementing React error boundaries involves wrapping component trees to catch JavaScript errors anywhere in the child component tree, log those errors, and display a fallback UI to enable graceful error recovery.