react-patterns

Guide React development with modern patterns, TypeScript, and testing strategies.

1|Updated Dec 21, 2024
One-click install
npx skills add https://github.com/SergeiGolos/wod-wiki --skill react-patterns-sergeigolos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/SergeiGolos/wod-wiki/tree/main/.agent/skills/react-patterns
Command: npx skills add https://github.com/SergeiGolos/wod-wiki --skill react-patterns-sergeigolos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Component Design: Understand different component types (Server, Client, Presentational, Container) and design rules.
  • 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.
  • React 19 Features: Overview of new hooks and compiler benefits.
  • Composition: Explore compound components and render props vs. hooks.
  • Performance Optimization: Strategies for identifying and fixing performance bottlenecks.
  • Error Handling: Best practices for implementing error boundaries and recovery.
  • TypeScript: Typing strategies for props and common types.
  • Testing: Principles for unit, integration, and E2E testing.
  • Anti-Patterns: Common pitfalls to avoid.
  • Use Case: A developer looking to improve their React application's structure, performance, and maintainability by adopting established patterns.

Quick Start

Explain the concept of compound components in React.

Frequently Asked Questions about react-patterns

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

FAQPage Schema
How do I choose the right state management solution for my React application?

To choose the right state management solution, evaluate your application's complexity. This Skill guides you through selecting appropriate state management strategies based on varying complexity levels to ensure scalable and maintainable React structures.

What are compound components in React and when should I use them?

Compound components are a composition technique allowing multiple components to implicitly share state. You should use them to build flexible, reusable UI structures, and this Skill explains their concepts compared against render props and custom hooks.

How do I optimize React performance and fix rendering bottlenecks?

To optimize React performance, you must identify and fix rendering bottlenecks using targeted strategies. This Skill covers performance optimization techniques to help developers build highly performant production-ready applications by addressing common bottlenecks.

Does this React guidance cover new features in React 19?

Yes, this React guidance covers new React 19 features, including an overview of new hooks and compiler benefits. It helps developers understand and apply the latest framework updates for building modern, production-ready applications.

What are common React anti-patterns I should avoid in production?

Common React anti-patterns to avoid include poor component design and improper hook extraction. This Skill outlines these frequent pitfalls to help developers build robust applications by steering clear of established anti-patterns during development.

How do I write TypeScript types for React props and common component types?

Writing TypeScript types for React props involves applying specific typing strategies to ensure strict safety. This Skill provides TypeScript best practices for typing props and common types, helping you build robust production-ready applications.