Diagnose slow React components and suggest targeted performance fixes.
SkillScore100Maintained
Automatic
◆Frontend / UI pack
Last verified 8/11/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
Move scroll state to a localized child component
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+71%
Agent turns
0%
Response time
-17%
Model gemini-3.6-flashMeasured 8/11/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
A scroll container updates `scrollTop` in root component state on every native scroll event, causing jank across all child cards. How should high-frequency scroll state be decoupled from heavy subtrees?
What was checked, without and with the skill
Checked
Without skill
With skill
Move scroll state to a localized child component
Missed
Passed
case-15 · gemini-3.6-flash · 8/11/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md131 lines2 files
React Component Performance
Overview
Identify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior.
When to Use
When the user asks to profile or improve a slow React component.
When you need to reduce re-renders, list lag, or expensive render work in React UI.
Workflow
Reproduce or describe the slowdown.
Identify what triggers re-renders (state updates, props churn, effects).
Isolate fast-changing state from heavy subtrees.
Stabilize props and handlers; memoize where it pays off.
Reduce expensive work (computation, DOM size, list length).
Validate: open React DevTools Profiler → record the interaction → inspect the Flamegraph for components rendering longer than ~16 ms → compare against a pre-optimization baseline recording.
Checklist
Measure: use React DevTools Profiler or log renders; capture baseline.
Find churn: identify state updated on a timer, scroll, input, or animation.
Split: move ticking state into a child; keep heavy lists static.
Memoize: wrap leaf rows with memo only when props are stable.
Stabilize props: use useCallback/useMemo for handlers and derived values.
Avoid derived work in render: precompute, or compute inside memoized helpers.
Control list size: window/virtualize long lists; avoid rendering hidden items.
Keys: ensure stable keys; avoid index when order can change.
Effects: verify dependency arrays; avoid effects that re-run on every render.
Style/layout: watch for expensive layout thrash or large Markdown/diff renders.
Optimization Patterns
Isolate ticking state
Move a timer or animation counter into a child so the parent list never re-renders on each tick.
// ❌ Before – entire parent (and list) re-renders every second
Production-ready patterns for React Native development with Expo, including navigation, state management, native modules, and offline-first architecture.