React re-renders a component when its state, props or parent change. Often the fix is structural, not a hook:
Move state down. If only one input needs the text, keep that state inside a small component, so typing does not re-render the whole page.
React.memo on a child skips re-rendering when its props are unchanged.
useMemo and useCallback keep the same object or function reference between renders, which is needed for memo to work. A new {} or () => {} created on each render looks like a changed prop.
Use stable keys (ids, not array index) in lists that change.
For long lists, use virtualisation (render only visible rows).
Measure first with the React DevTools Profiler. Adding useMemo everywhere has a cost too, so apply it where the Profiler shows real wasted time.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
React re-renders a component when its state, props or parent change. Often the fix is structural, not a hook:
{}or() => {}created on each render looks like a changed prop.Measure first with the React DevTools Profiler. Adding useMemo everywhere has a cost too, so apply it where the Profiler shows real wasted time.