Skip to content
Agentmart
Submit a tool

react-performance

React performance optimization - memoization, list virtualization, lazy loading, bundle size.

Skill by ArkadiuszSieracki

IndexedApache-2.0
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/arkadiuszsieracki-react-performance

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

React performance optimization - memoization, list virtualization, lazy loading, bundle size. Use for: slow render, list with thousands of elements, excessive re-renders, useMemo, useCallback, React.memo, lazy, Suspense.

Use cases: frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/react-performance

What's inside

Skill name
react-performance
Description
React performance optimization - memoization, list virtualization, lazy loading, bundle size. Use for: slow render, list with thousands of elements, excessive re-renders, useMemo, useCallback, React.memo, lazy, Suspense.
License
Apache-2.0
Instructions
153 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# React Performance - optimization patterns

## When to use

- Component renders too often (excessive re-renders)
- List with hundreds/thousands of elements is slow
- Heavy computation runs on every render
- Bundle/chunk is too large (long initial load)
- Handler is recreated on every render

## Primary rule

**Do not optimize prematurely.** Measure first (React DevTools Profiler), then optimize. Premature memoization hurts readability and can be slower than no optimization.

## useMemo - expensive calculations

```tsx
// [BAD] Calculation on every render
function RecordingStats({ recordings }) {
  const stats = computeHeavyStats(recordings); // expensive
  return <StatsChart data={stats} />;
}

// [OK] Memoize only when computeHeavyStats is actually expensive
const stats = useMemo(
  () => computeHeavyStats(recordings),
  [recordings], // recalculate only when recordings changes
);
```

**When NOT to use useMemo:**

- Simple calculations (filter on array of 10 elements)
- Creating objects/arrays as effect dependencies -> use `useRef` or move outside component instead

## useCallback - stable handlers

```tsx
// [BAD] Handler recreated on every render
// Problem when passed to a memoized child component
const handleDelete = (id: string) => deleteRecording(id);

// [OK] Stable reference
const handleDelete = useCallback(
  (id: string) => deleteRecording(id),
  [deleteRecording], // from React Query mutation - usually stable
);
```

## React.memo - preventing child re-renders

```tsx
// [OK] When component receives same props but parent changes
const RecordingCard = React.memo(function RecordingCard({
  recording,
  onDelete,
}) {
  return (
    <StyledCard>
      <Typography>{recording.name}</Typography>
      <IconButton onClick={() => onDelete(recording.id)} />
    </StyledCard>
  );
});
// Note: requires stable props (useCallback for handlers, useMemo for objects)
```

## List virtualization - mandatory for 100+ elements

```tsx
// [BAD] Renders all 5000 elements to DOM
{
  recordings.map((r) => <RecordingCard key={r.id} recording={r} />);
}

// [OK] Renders only visible elements (react-window or @tanstack/react-virtual)
import { FixedSizeList } from "react-window";

<FixedSizeList
  height={600}
  itemCount={recordings.length}
  itemSize={72}
  width="100%"
>
  {({ index, style }) => (
    <div style={style}>
      <RecordingCard recording={recordings[index]} onDelete={handleDelete} />
    </div>
  )}
</FixedSizeList>;
```

## Lazy loading - code splitting

```tsx
// [BAD] All pages in one bundle
import { TrainingPage } from "@/training/components/TrainingPage";

// [OK] Lazy load for pages and heavy components
const TrainingPage = lazy(() => import("@/training/components/TrainingPage"));

// In router with Suspense:
<Suspense fallback={<PageSkeleton />}>
  <TrainingPage />
</Suspense>;
```

## Stable list keys

```tsx
// [BAD] Index as key - causes unnecessary re-mounts when sorting/filtering
{recordings.map((r, i) => <RecordingCard key={i} ... />)}

// [OK] Stable unique identifier
{recordings.map(r => <RecordingCard key={r.id} ... />)}
```

## React Query - query optimization

From ArkadiuszSieracki/mastermind-agentic-sdlc-vscode-copilot, Apache-2.0.

More from ArkadiuszSieracki/mastermind-agentic-sdlc-vscode-copilot

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Apr 23, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ArkadiuszSieracki

Cite this page

react-performance skill. Agent Mart. https://agentmart.dev/skills/arkadiuszsieracki-react-performance (last updated 2026-10-24)