react-best-practices

Apply React best practices and anti-patterns to components, hooks, and state management.

23|24|Updated Oct 7, 2025
One-click install
npx skills add https://github.com/burnjohn/quick-blog --skill react-best-practices-burnjohn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/burnjohn/quick-blog/tree/main/.claude/skills/react-best-practices
Command: npx skills add https://github.com/burnjohn/quick-blog --skill react-best-practices-burnjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React projects often suffer from inconsistent patterns, bloated components, and difficult-to-maintain codebases. This Skill catalogs current React best practices and anti-patterns (2025-26) to guide teams in writing, reviewing, or refactoring components, hooks, and state management.

Core Features & Use Cases

  • Component Design: enforce pure components, small, focused units, and clear data flow.
  • Hooks & State: proper usage, avoiding common pitfalls like derived state and overuse of useEffect.
  • Performance & Rendering: memoization, code-splitting, and minimizing unnecessary re-renders.
  • Data Fetching & Effects: standardized patterns, error handling, and loading states.
  • Code Organization: feature-based structure, consistent naming, and maintainable file layout.
  • Use Case: onboarding new engineers, performing code reviews, and refactoring legacy React code.

Quick Start

Review your React codebase and start applying the guidelines during refactoring to improve readability and reliability.

Frequently Asked Questions about react-best-practices

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

FAQPage Schema
What are the current React best practices for component design and hooks?

React best practices for component design enforce pure, small, and focused components with clear data flow, while proper hook usage avoids common pitfalls like derived state and overusing useEffect to improve overall code quality.

How do I refactor legacy React code to improve code quality and maintainability?

Refactor legacy React code by applying established guidelines for component design, hook usage, and state management, restructuring files into a feature-based organization to improve readability and reliability across the codebase.

What is the best way to optimize React performance and reduce unnecessary re-renders?

The best way to optimize React performance involves applying memoization, code-splitting, and minimizing unnecessary re-renders by ensuring components are pure and properly managing state dependencies.

Why does my React component have derived state and how do I fix it?

Derived state in React components often arises from overusing useEffect or mismanaging state flow, which you can fix by adhering to standardized data fetching patterns and ensuring clear data flow within pure components.

Can I use these React best practices for onboarding new engineers and code reviews?

Yes, you can use these React best practices for onboarding new engineers and conducting code reviews, as they provide standardized rules for component design, performance optimization, and code organization to ensure consistency.

When should I not use memoization in React components?

Memoization in React components should not be used when a component is already lightweight and pure, as unnecessary memoization can introduce overhead without meaningful performance gains or reductions in re-renders.