Skip to content
Back to skills

React Best Practices

ASecurity

Diagnose React performance problems or review and improve state and effect design.

  • 63 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
code-qualityreactapiperformancedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add ahonn/dotfiles --skill react-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ahonn-react-best-practices/badge)](https://www.skillsdirectory.com/skills/ahonn-react-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: react-best-practices
description: Diagnose React performance problems or review and improve state and effect design.
user-invocable: false
---

# React Performance and State Design

Start from the reported behavior and relevant implementation. Select only the references that address the task; the catalog is not a checklist to apply to every component.

## Establish applicability

- Inspect the installed React version, framework, target platform, build configuration, and existing compiler setup before proposing version-dependent changes.
- Identify the bottleneck with a reproduction, profiler trace, bundle report, or concrete dependency path. If measurement is unavailable, label the diagnosis as a hypothesis and explain how to validate it.
- Prefer a focused change with an observable benefit. Do not add or remove memoization, introduce caching, change build tooling, or preload resources without a reason tied to the task.
- Follow the project's state, effect, and data-fetching conventions. Web rendering, SSR, and framework-specific examples do not automatically apply to React Native or a different framework.

## Read by problem

| Problem or decision | Relevant references |
|---------------------|---------------------|
| Redundant state or synchronization bugs | [State structure](references/state-structure.md), [immutable updates](references/immutable-updates.md), [effect pitfalls](references/effect-pitfalls.md) |
| A specific hook lifecycle or API question | [Hooks guide](references/hooks-guide.md) |
| Requests wait on independent work | [Waterfall elimination](references/async-waterfall-elimination.md), [parallel requests](references/async-parallel-requests.md) |
| Bundle report shows costly imports or initial code | [Barrel imports](references/bundle-barrel-imports.md), [dynamic imports](references/bundle-dynamic-import.md) |
| Resource loading delays a likely user action | [Preload on intent](references/bundle-preload.md) |
| Profiler shows costly repeated rendering | [Memoization strategy](references/rerender-memo-strategy.md), [context splitting](references/rerender-context-splitting.md) |
| Non-urgent rendering blocks an interaction | [Transitions](references/rerender-transitions.md) |
| Compiler adoption or compilation behavior is in scope | [React Compiler](references/react-compiler.md) |
| Repeated lookup cost is significant | [Set and Map lookups](references/js-set-map-lookups.md) |
| List identity or unexpected remounts | [Key patterns](references/rendering-key-patterns.md) |
| Expensive off-screen web content | [Content visibility](references/rendering-content-visibility.md) |
| Server-rendered web content visibly changes on hydration | [Hydration flicker](references/rendering-hydration-flicker.md) |
| Repeated static JSX creation is relevant to a measured cost | [Hoist static JSX](references/rendering-hoist-static-jsx.md) |
| Repeated server work or cache correctness | [Server caching](references/server-cache-patterns.md) |

Reference priority labels and examples describe possible interventions, not mandatory changes. Verify version-sensitive APIs and configuration against the installed toolchain and current official documentation before using them. React version alone is not a reason to enable React Compiler.

## Complete the change

Preserve required behavior and use the applicable AGENTS.md test mode. For performance changes, compare the affected interaction or load path before and after when feasible; otherwise state the remaining verification gap. Report the concrete benefit and relevant limitations without claiming an unmeasured speedup.

Files in this skill

  • SKILL.md4.5 KB
  • references/async-parallel-requests.md3.3 KB
  • references/async-waterfall-elimination.md4.4 KB
  • references/bundle-barrel-imports.md3.2 KB
  • references/bundle-dynamic-import.md3.9 KB
  • references/bundle-preload.md2.9 KB
  • references/effect-pitfalls.md5.3 KB
  • references/hooks-guide.md4.3 KB
  • references/immutable-updates.md4.2 KB
  • references/js-set-map-lookups.md4.4 KB
  • references/react-compiler.md5.2 KB
  • references/rendering-content-visibility.md3.9 KB
  • references/rendering-hoist-static-jsx.md3.6 KB
  • references/rendering-hydration-flicker.md4.1 KB
  • references/rendering-key-patterns.md4.9 KB
  • references/rerender-context-splitting.md5 KB
  • references/rerender-memo-strategy.md5.4 KB
  • references/rerender-transitions.md4.4 KB
  • references/server-cache-patterns.md4.9 KB
  • references/state-structure.md4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.