Performance workflow
- Measure with React DevTools Profiler
- Identify bottlenecks
- Apply targeted optimizations
- Re-measure and validate impact
Common optimizations
React.memofor stable pure componentsuseMemofor expensive derived valuesuseCallbackfor stable callbacks- List virtualization for large datasets
- Route-level code splitting with
lazyandSuspense
Code splitting example
tsx
const AdminPage = lazy(() => import('./pages/AdminPage'));
<Suspense fallback={<p>Loading...</p>}>
<AdminPage />
</Suspense>Anti-patterns
- Premature memoization everywhere
- Massive components with mixed responsibilities
- Heavy computations during render
Next, we will deploy React apps to production.