Skip to content
Back to skills

React Perf

ASecurity

Diagnose and eliminate needless React re-renders with memoization

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 3, 2026
ai-agentsgoreact

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill react-perf --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Perf?

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

Security grade badge for React Perf
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-react-perf/badge)](https://www.skillsdirectory.com/skills/black141312-react-perf)

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-perf
description: Diagnose and eliminate needless React re-renders with memoization
category: frameworks
---

# React Perf

Use when a component tree re-renders too often or feels janky, and you need to find and cut the wasted work — measure first, optimize second.

1. Profile with the React DevTools Profiler (or `<Profiler>`) to find which components re-render and why; don't guess.
2. Identify the trigger: a new object/array/function prop created each render, an over-broad context, or state lifted too high.
3. Stabilize prop identities with `useMemo` (values) and `useCallback` (functions) so memoized children actually skip renders.
4. Wrap pure leaf/list components in `React.memo`; for lists, ensure stable `key`s that aren't array indices.
5. Split or scope context, or lift state down, so a frequently-changing value doesn't re-render the whole subtree.
6. Re-profile to confirm the render count dropped; remove any memoization that didn't move the needle.

## Rules
- Never optimize without a before/after measurement — memoization has its own cost.
- `React.memo` is useless if you pass it a freshly-created object/callback each render; fix the parent first.
- Inline `{}`/`[]`/`() => {}` in JSX create new references every render — hoist or memoize them.
- A `useMemo`/`useCallback` with wrong deps reintroduces the bug or causes stale closures; keep deps honest.
- Heavy work in render belongs in `useMemo` or out of the component; effects don't make render faster.

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.

Comments

Loading comments…

Newsletter

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