- Home
- Skills
- Frontend & Web Apps
- React Re-render Performance Fixer with Profiler and INP
Works with the AI Agents you already use
React Re-render Performance Fixer with Profiler and INP
Measures slow React interactions with the Profiler, Performance tracks and INP, applies the smallest re-render fix, proves it before/after, and rates it SNAPPY / SLUGGISH / JANKY
$5
React Re-render Performance Fixer with Profiler and INP
Example session with this skill installed
Typing in the search box on our /orders page lags badly. It's a React 19 + Vite app with Zustand and a table of about 2,000 orders. Find out why it re-renders so much and fix it.
- Read your context and instructions
- Compiled the react re-render performance
- Generated the UI component
React re-render report: typing in the search box on /orders
Stack: React 19.3 · Vite · Compiler: off · Store: Zustand
Build used for numbers: PROFILING (median of 3 runs, typing "acme", 4 keystrokes). Numbers below are illustrative of the format.
Baseline vs after
| Metric | Before | After | Source |
|---|---|---|---|
| Commits per interaction | 8 | 4 | Profiler |
| Slowest commit (ms) | 142 | 11 | Profiler |
OrderRow renders per keystroke | 2,000 | 0 | Profiler ranked |
| INP (ms) | not measured | not measured | add web-vitals/attribution |
Causes found
OrdersProvider(src/orders/context.tsx:18):value={{ orders, filter, setFilter }}is a new object every render. Profiler reason: "Context changed" on all 2,000OrderRows.OrdersPage(src/orders/OrdersPage.tsx:31):filteredstored in state and set in auseEffect, so each keystroke commits twice (8 commits for 4 keys).OrdersTablerenders all 2,000 rows with no virtualization.
Fixes applied
// 1. split contexts: rows read only the stable dispatch context
<FilterDispatch.Provider value={setFilter}>
<FilterState.Provider value={filter}>{children}</FilterState.Provider>
</FilterDispatch.Provider>
// 2. derive during render instead of state + effect
const deferred = useDeferredValue(filter);
const filtered = useMemo(() => orders.filter(byText(deferred)), [orders, deferred]);
// 3. virtualize (TanStack Virtual v3)
const v = useVirtualizer({ count: filtered.length,
getScrollElement: () => ref.current, estimateSize: () => 36 });
Not changed (and why)
- Zustand subscriptions: components already use selectors, so no change.
- No
React.memoadded toOrderRow: after fixes 1 and 3 it no longer appears in the hot commit. - React Compiler not enabled yet:
eslint-plugin-react-hookscompiler rules flag 2 files that mutate props; fix those first.
Verdict: SLUGGISH -> SNAPPY (lab)
Slowest commit dropped from 142 ms to 11 ms in the profiling build. Next step: ship onINP from web-vitals/attribution and confirm field INP stays at or under 200 ms.
context.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Your React app lags when someone types, filters or scrolls, and the usual advice is to wrap everything in useMemo and React.memo. That often adds code without fixing the real cause, and nobody checks whether it helped.
This skill gives your coding agent a measure-first method:
- Records the slow interaction with the React DevTools Profiler (with "why did this render" on), the React Performance tracks in Chrome DevTools (React 19.2+), and INP from the web-vitals attribution build. Every number is labeled DEV, PROFILING or FIELD.
- Maps each hot component to one cause: unstable context values, new object or function props, state lifted too high, derived state stored in state, effect loops, unvirtualized lists, expensive render work, broad Redux or Zustand subscriptions, and key misuse. Includes search commands to find candidates.
- Applies the smallest fix first: move state down or pass children, split contexts, store selectors, virtualization with TanStack Virtual or react-window, useDeferredValue and useTransition, and memoization only where the Profiler shows a need.
- Explains React Compiler v1.0 and how to enable it with Babel, Vite or Next.js, and when manual memo can go.
- Re-measures the same interaction and reports commit counts and render times before and after, with a SNAPPY / SLUGGISH / JANKY verdict.
For frontend developers and tech leads working on React 17 to 19 apps in Vite, Next.js or similar setups.
Honesty note: the skill never invents timings, commit counts or speedups. If the agent cannot run your app, it gives you the recording steps and marks results as pending. Versions and setup steps were checked against react.dev and related docs in October 2026; it tells the agent to re-check them when web access is available.
Real before and after numbers require running the app in a browser with React DevTools, or a recording you provide. Without that, the skill gives diagnosis and fixes but marks results as pending measurement. It targets render performance in React DOM apps; slow APIs, large bundles and React Native tooling are out of scope. Version details reflect October 2026 docs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 29 days ago
Requires