react-patterns

Guide React and TypeScript UI architecture with state, routing, and form patterns.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill react-patterns-rogeriosobrinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/RogerioSobrinho/codeme-copilot/tree/main/skills/react-patterns
Command: npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill react-patterns-rogeriosobrinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams structure React applications in TypeScript by standardizing patterns for component design, state management, data fetching, routing, and form handling.

Core Features & Use Cases

  • Pattern-focused architecture guidance to organize code into features, shared components, and clear boundaries.
  • State management and data fetching patterns using Zustand, React Query, and TanStack Query, with practical examples.
  • Form handling and validation using React Hook Form + Zod, and guidance on type-safe forms and schema validation.
  • Decision guidance on when to use Context vs Zustand, and how to compose scalable React apps for real-world projects.

Quick Start

Describe a React TypeScript scenario and request a recommended pattern for structuring state, data fetching, and forms.

Frequently Asked Questions about react-patterns

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

FAQPage Schema
When should I use React Context versus Zustand for state management?

Use React Context for localized, low-frequency state updates to prevent unnecessary re-renders, and choose Zustand for scalable, global state management requiring fine-grained component subscriptions. This pattern ensures maintainable UI architectures without performance bottlenecks.

How do I structure a scalable TypeScript React application?

Structure scalable TypeScript React applications by organizing code into distinct features, shared components, and clear architectural boundaries. This pattern-focused approach defines concrete requirements for hooks and component composition, separating feature logic from shared UI elements.

What is the best way to handle type-safe forms and validation in React?

Handle type-safe forms and validation in React by integrating React Hook Form with Zod schema validation. This pattern ensures runtime type safety, minimizes re-renders, and standardizes data validation logic for scalable applications.

How do I manage data fetching patterns in React using TanStack Query?

Manage data fetching in React using TanStack Query to handle server state, caching, and asynchronous operations. This pattern standardizes data-fetching logic across features, separating server data from client state managed by Zustand.

Does this React pattern guidance apply to small components or only feature-rich apps?

These React and TypeScript patterns apply to a wide range of projects, from building small individual components to structuring feature-rich applications. The architectural guidance scales by defining clear boundaries, hooks, and state management decisions.