React Performance
5 min read
Profile with React DevTools Profiler to find slow renders. Apply React.memo for stable components, useMemo for expensive calculations, and virtualise long lists with react-virtual. Always measure before optimising.
Optimising React Apps
- Use
React.memo for pure components - Use
useMemo for expensive calculations - Use
useCallback for stable callbacks passed to children - Code-split with
React.lazy + Suspense - Use windowing for large lists (
react-window) - Profile with React DevTools Profiler
- Avoid anonymous functions in JSX props