React optimise

From pproenca/dot-skills · View interactive version

React optimise is an AI agent skill from the GitHub repository pproenca/dot-skills. Application-level React performance optimization covering React Compiler mastery, bundle optimization, rendering performance, data fetching, Core Web Vitals, state subscriptions, profiling, and memory management. Use when optimizing React app performance, analyzing bundle size, improving Core Web Vi

How to use this skill

Skill file

React Optimise Best Practices

Application-level performance optimization guide for React applications. Contains 43 rules across 8 categories, prioritized by impact from critical (React Compiler, bundle optimization) to incremental (memory management).

When to Apply

Rule Categories

| Category | Impact | Rules | Key Topics |

|----------|--------|-------|------------|

| React Compiler Mastery | CRITICAL | 6 | Compiler-friendly code, bailout detection, incremental adoption |

| Bundle & Loading | CRITICAL | 6 | Route splitting, barrel elimination, dynamic imports, prefetching |

| Rendering Optimization | HIGH | 6 | Virtualization, children pattern, debouncing, CSS containment |

| Data Fetching Performance | HIGH | 5 | Waterfall elimination, route preloading, SWR, deduplication |

| Core Web Vitals | MEDIUM-HIGH | 5 | INP yielding, LCP priority, CLS prevention, image optimization |

| State & Subscription Performance | MEDIUM-HIGH | 5 | Context splitting, selectors, atomic state, derived state |

| Profiling & Measurement | MEDIUM | 5 | DevTools profiling, flame charts, CI budgets, production builds |

| Memory Management | LOW-MEDIUM | 5 | Effect cleanup, async cancellation, closure leaks, heap analysis |

Quick Reference

Critical patterns — get these right first:

Common mistakes — avoid these anti-patterns:

Table of Contents

  1. React Compiler Mastery — CRITICAL
  1. Bundle & Loading — CRITICAL
  1. Rendering Optimization — HIGH
  1. Data Fetching Performance — HIGH
  1. Core Web Vitals — MEDIUM-HIGH
  1. State & Subscription Performance — MEDIUM-HIGH
  1. Profiling & Measurement — MEDIUM
  1. Memory Management — LOW-MEDIUM

References

  1. https://react.dev
  2. https://react.dev/blog/2025/10/07/react-compiler-1
  3. https://web.dev/articles/vitals
  4. https://tanstack.com/virtual
  5. https://developer.chrome.com/docs/devtools/performance

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.