agentleFS
jscott3201jscott3201/yet-more-skills/skills/react-performance/SKILL.md

react-performance

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Measure and improve React rendering, subscriptions, expensive work, and route loading. Trigger on a concrete performance task, not ordinary React syntax or speculative memoization.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vite-patterns, react-testing and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • aragaobrunoSkill

    vite-patterns

    Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.

    Also in 3 projects that use this

  • SentrySkill

    react-testing

    Write and review React/TypeScript tests for Sentry's frontend using Jest and React Testing Library. Use when adding or editing tests in static/ (*.spec.tsx), writing component/hook tests, mocking API responses with MockApiClient, testing routing or network requests, or when asked to "write a frontend test", "add a React test", "test this component", or "fix a flaky RTL test".

    Also in 4 projects that use this

  • joneqianSkill

    postgres-patterns

    PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.

    Also in 3 projects that use this

  • InfopibeSkill

    deployment-patterns

    Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

    Also in 3 projects that use this

  • LangChainSkill

    docker-patterns

    Best practices for Docker containerization and multi-stage builds

    Also in 3 projects that use this

  • mryeastcodeSkill

    context-budget

    Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start with avoidable work: sequential independent requests, eager heavy routes, oversized payloads, broad store subscriptions, repeated …

    line 15
  2. Distinctive:

    Keep query state in its existing cache rather than mirroring it throughout a global store.

    line 17
  3. Distinctive:

    Use deferred rendering or transitions for suitable non-urgent views without delaying controlled input feedback or safety-critical status.

    line 30
  4. Distinctive:

    Read practice notes and sources only when the task needs more depth.

    line 45

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React Performance

Measure the operation, not the component's reputation

Reproduce a slow user action with representative data, a defined browser/device class, and the relevant production build. Separate network wait, JavaScript, React render/commit, layout, and paint. Use the available profiler and browser tools; state explicitly when measurements cannot be run. Development double rendering is not a production latency baseline.

Start with avoidable work: sequential independent requests, eager heavy routes, oversized payloads, broad store subscriptions, repeated transformations, and excessive mounted UI. Keep query state in its existing cache rather than mirroring it throughout a global store. Select the smallest stable state slice a consumer needs.

Choose the narrowest change

Memoize expensive work or stabilize references only when identity matters or profiling supports it. Check whether React Compiler is actually enabled and which code it covers. Do not blanket add or remove memo, useMemo, or useCallback. Keep hook dependencies correct.

Split heavy optional features using the application's supported lazy-loading path. A Vite SPA does not use next/dynamic. Preserve useful loading/error fallbacks and avoid replacing one waterfall with another. Keep imports within supported package exports.

Use deferred rendering or transitions for suitable non-urgent views without delaying controlled input feedback or safety-critical status. These techniques schedule work; they do not make expensive computation disappear. Virtualization and workers need their own accessibility, ownership, and data-volume checks.

Confirm the tradeoff

Compare before/after with equivalent data and conditions, including initial load, repeated interaction, memory growth, and key correctness tests. Run performance measurements without competing agent builds or browsers. An apparent win within run-to-run noise is inconclusive. Reject changes that remove useful checks, hide stale data, lose keyboard focus, or weaken backend confirmation just to make the interface appear faster.

Further guidance

Read practice notes and sources only when the task needs more depth.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.