react-patterns

Provides standardized React 18+ implementation patterns for frontend applications.

5|1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill react-patterns-roanbrasil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/react-patterns
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill react-patterns-roanbrasil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common pain points of writing inconsistent, buggy, or poorly performing React code by providing standardized, idiomatic patterns for React 18+ development, eliminating technical debt and ensuring long-term maintainability of frontend applications.

Core Features & Use Cases

  • Component Design Patterns: Single responsibility, explicit prop interfaces, composition, and compound component patterns for reusable, readable UI.
  • Hooks & State Management Best Practices: Guidance on useState vs useReducer, useEffect rules, custom hooks, and selection of the right state management tool (Context, Zustand, TanStack Query) for different use cases.
  • Performance Optimization: Code splitting, virtual lists, memoization strategies, and render decision trees to eliminate unnecessary re-renders and improve app speed.
  • Anti-Pattern Avoidance: Clear guidance on common mistakes like deriving state from props, missing useEffect cleanup, and overusing Context to prevent bugs and performance issues.
  • Use Case: A developer building a large-scale e-commerce React dashboard can use these patterns to implement efficient product data fetching with TanStack Query, structure product card components for reusability, and optimize render performance for large product lists.

Quick Start

Invoke the react-patterns skill to review and refactor your existing React component's state management and performance implementation to align with React 18+ industry best practices.

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 managing state in large React 18 applications?

To prevent unnecessary React re-renders, apply memoization strategies, implement code splitting, use virtual lists for large datasets, and follow render decision trees to optimize component performance and eliminate suboptimal render cycles.

How do I avoid common React hooks anti-patterns like missing useEffect cleanup?

Avoiding React hooks anti-patterns requires following strict useEffect rules, preventing state derivation from props, and extracting logic into custom hooks, which eliminates bugs and ensures consistent component behavior across your application.

When should I use useReducer instead of useState for React component design?

Compound component patterns in React promote composition and single responsibility, allowing you to build reusable and readable UI components with explicit prop interfaces for maintainable frontend architecture.

Does this approach work for data fetching and performance optimization in React?

Yes, this approach standardizes data fetching using tools like TanStack Query and implements performance optimization patterns including code splitting and virtual lists to satisfy requirements for scalable, performant user interface code.