# React performance

> How to find what makes a React app slow and fix it.

By Soufiane El Hamri. Published 2026-11-20. Source: https://www.soufiane-elhamri.com/blogs/react-performance

A React app feels slow when the browser has too much code to download, or when React has too much work to do after each change. The browser draws a new frame about every 16 milliseconds. If React takes longer, clicks and typing wait until it finishes.

Before you fix anything, find the part that is slow. The React Profiler records what happens when you use the page. It shows which components rendered and how long each one took, so you know where the time goes.

Sometimes the problem is just how much code you send to the browser. The browser has to download it before the page can start. So send only the code the user needs at that moment. A page they haven't opened yet, or a chart behind a button, can wait. With `lazy`, React downloads that part the first time it appears. `Suspense` shows a loading message while it arrives.

React can also waste time on parts of the page that didn't change. When a component's state changes, React renders it again, along with every component inside it. Most of those inner components get the same data as before, so rendering them again does nothing useful. Keep state in the component that uses it, so a change only touches the part of the page that needs it. For a slow component, `memo` tells React to skip it when its props are the same as last time. The React Compiler adds `memo` for you.

A slow calculation inside a component, like sorting thousands of items, runs again on every render. `useMemo` keeps the result and recalculates only when its inputs change. If one run is still too slow, a web worker can do it on a separate thread, so the page keeps responding.

Long lists are slow for a simpler reason. Each row is cheap, but React still has to render ten thousand of them and add them all to the page. The user only sees a screenful at a time. Windowing renders just those rows and swaps them as the user scrolls.

When the work still can't shrink, `useDeferredValue` tells React which update can wait. The rule that matters most is to fix the slow render before the re-render, because skipping renders of a slow component only hides the problem. Using `memo` or `useMemo` everywhere can even make things worse. Both compare values on every render, and on a cheap component that check can cost more than the render it saves. Every optimization adds code to maintain, so measure again after each change.
