Performance optimization for React applications — rendering, re-renders, data-fetching waterfalls, bundle size, and the JavaScript hot paths inside components. Use when the user mentions slow or janky renders, unnecessary re-renders, memoization (React.memo / useMemo / useCallback), lazy loading, code splitting, bundle size, request waterfalls, duplicate or repeated API requests, request deduplication, caching fetched data in localStorage, scroll or touch event listeners, laggy scrolling or typing, or asks to review, profile, or speed up React code. Not a general React authoring guide — for folder and layer structure use react-feature-sliced-design, for language and typing questions use typescript-development.
71
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Performance optimization guide for React applications: 37 rules across 7 categories.
Categories are ordered by how much they typically move the needle, so work top-down
when reviewing. Each rule carries its own impact: value in the front matter of its
file in references/, and that per-rule value is what the Quick Reference below
shows — a lower-priority category can still hold a high-impact rule, which is why
the category order and the rule impacts are reported separately.
| Priority | Category | Prefix | Rules |
|---|---|---|---|
| 1 | Eliminating Waterfalls | async- | 2 |
| 2 | Bundle Size Optimization | bundle- | 4 |
| 3 | Client-Side Data Fetching | client- | 4 |
| 4 | Re-render Optimization | rerender- | 7 |
| 5 | Rendering Performance | rendering- | 6 |
| 6 | JavaScript Performance | js- | 12 |
| 7 | Advanced Patterns | advanced- | 2 |
Impact labels below are the impact: value from each rule file's front matter.
async-)async-defer-await (HIGH) - Move await into branches where actually usedasync-parallel (CRITICAL) - Use Promise.all()/allSettled() for independent operationsbundle-)bundle-dynamic-imports (CRITICAL) - React.lazy() for heavy componentsbundle-conditional (HIGH) - Load modules only when feature is activatedbundle-defer-third-party (MEDIUM) - Load analytics/logging on demandbundle-preload (MEDIUM) - Preload on hover/focus for perceived speedclient-)client-query-dedup (MEDIUM-HIGH) - Use TanStack Query for automatic request deduplicationclient-passive-event-listeners (MEDIUM) - Use passive listeners for scroll performanceclient-localstorage-schema (MEDIUM) - Version and minimize localStorage dataclient-event-listeners (LOW) - Deduplicate global event listenersrerender-)rerender-defer-reads (MEDIUM) - Don't subscribe to state only used in callbacksrerender-memo (MEDIUM) - Extract expensive work into memoized componentsrerender-derived-state (MEDIUM) - Subscribe to derived booleans, not raw valuesrerender-functional-setstate (MEDIUM) - Use functional setState for stable callbacksrerender-lazy-state-init (MEDIUM) - Pass function to useState for expensive valuesrerender-transitions (MEDIUM) - Use startTransition for non-urgent updatesrerender-dependencies (LOW) - Use primitive dependencies in effectsrendering-)rendering-content-visibility (HIGH) - Use content-visibility for long listsrendering-activity (MEDIUM) - Use Activity component for show/hiderendering-animate-svg-wrapper (LOW) - Animate div wrapper, not SVG elementrendering-hoist-jsx (LOW) - Extract static JSX outside componentsrendering-svg-precision (LOW) - Reduce SVG coordinate precisionrendering-conditional-render (LOW) - Use ternary, not && for conditionalsjs-)These rules are framework-agnostic JavaScript. They are here because they pay off in the hot paths React components run — render bodies, effects, event handlers, and the helpers those call. Reach for them when profiling points at a specific loop or lookup, not as general style guidance.
js-length-check-first (MEDIUM-HIGH) - Check array length before expensive comparisonjs-tosorted-immutable (MEDIUM-HIGH) - Use toSorted() for immutabilityjs-batch-dom-css (MEDIUM) - Group CSS changes via classes or cssTextjs-cache-function-results (MEDIUM) - Cache function results in module-level Mapjs-index-maps (LOW-MEDIUM) - Build Map for repeated lookupsjs-cache-property-access (LOW-MEDIUM) - Cache object properties in loopsjs-cache-storage (LOW-MEDIUM) - Cache localStorage/sessionStorage readsjs-combine-iterations (LOW-MEDIUM) - Combine multiple filter/map into one loopjs-early-exit (LOW-MEDIUM) - Return early from functionsjs-hoist-regexp (LOW-MEDIUM) - Hoist RegExp creation outside loopsjs-set-map-lookups (LOW-MEDIUM) - Use Set/Map for O(1) lookupsjs-min-max-loop (LOW) - Use loop for min/max instead of sortadvanced-)advanced-event-handler-refs (LOW) - Store event handlers in refsadvanced-use-latest (LOW) - useLatest for stable callback refsEach rule file in references/ contains: an explanation, an incorrect/correct code
pair, and context. Read individual files as needed.
provectus/awos-recruitment
ce6a3ea
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.