react-patterns

Standardize React 19 component architecture with TypeScript design patterns.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/0xRayAI/xray --skill react-patterns-0xrayai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/0xRayAI/xray/tree/main/integrations/react-patterns
Command: npx skills add https://github.com/0xRayAI/xray --skill react-patterns-0xrayai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of maintaining scalable, performant, and clean React codebases by providing standardized patterns for component design, state management, and error handling.

Core Features & Use Cases

  • Component Architecture: Guidance on choosing between Server, Client, Presentational, and Container components to optimize rendering.
  • State Management Strategy: Clear decision matrices for selecting between local state, Context, or global stores like Zustand.
  • Performance Optimization: Best practices for memoization, virtualization, and profiling to ensure production-ready application speed.

Quick Start

Ask the react-patterns skill to analyze your current component structure and suggest improvements for state placement and performance optimization.

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 better performance and maintainability?

To structure React components for performance, separate Server, Client, Presentational, and Container components. This architectural pattern optimizes rendering across complex UI trees and ensures your codebase remains scalable and clean.

When should I use local state, Context, or a global store like Zustand in React?

You should choose between local state, Context, or a global store like Zustand by using a state management decision matrix. This strategy ensures optimal state placement and prevents unnecessary re-renders in complex React applications.

What is the best way to optimize React rendering performance for production?

The best way to optimize React rendering performance is by applying memoization, virtualization, and profiling. These production-ready practices ensure application speed and adhere to modern React 19 standards.

Does this approach support modern React 19 and TypeScript best practices?

Yes, this approach fully supports modern React 19 standards and TypeScript best practices. It standardizes production-grade development by guiding component composition, state management, and error boundary implementation.

How do I implement error boundaries across complex React UI trees?

Implement error boundaries across complex React UI trees by following standardized design patterns for error handling. This ensures your application maintains resilience and adheres to established architectural principles.