Why does my React component re-render too often?

Updated October 2026 · How we answer

Short answerCommon causes include state changes in parent components, new object/array props, inline function props, and context updates. Use React.memo, useCallback, useMemo, and proper dependency arrays to optimize.

Common causes of excessive re-renders

React re-renders a component when its state or props change, or when its parent re-renders. If a parent re-renders, all children re-render by default, even if their props haven't changed. Passing new object or array literals as props each render creates new references, triggering re-renders. Inline functions also create new references. Context updates cause all consumers to re-render.

Also, if you update state in a way that doesn't change the value (e.g., setting the same value), React may still re-render once. Using the state updater function incorrectly can cause extra renders.

How to diagnose and fix

Use React DevTools Profiler to identify which components re-render and why. Wrap components in React.memo to prevent re-renders when props are shallowly equal. Use useCallback to memoize functions and useMemo to memoize expensive computations or object references. Ensure dependency arrays are correct. For context, split contexts or use selectors.

Avoid defining components inside other components, as this creates new component types on each render. Lift state up only when necessary, and consider state management libraries for complex cases.

  • Use React.memo for pure components
  • Memoize callbacks with useCallback
  • Memoize values with useMemo
  • Avoid inline object/array props
  • Split contexts to reduce consumers
  • Use DevTools Profiler to find culprits

Common mistakes

  • Assuming all re-renders are bad—some are necessary and cheap.
  • Overusing useMemo and useCallback, which can add complexity and overhead.
  • Forgetting that React.memo only does a shallow comparison; deep equality requires custom comparison.
From our shopsSwiftCase: Curated phone cases that ship in 48 hours.