react icon indicating copy to clipboard operation
react copied to clipboard

Bug: Suspense fallback re-renders excessively during slow network responses

Open kl2400033266 opened this issue 1 month ago • 2 comments

Description

When using React.Suspense with a fallback component, the fallback is being re-rendered multiple times during slow network requests. This causes unnecessary UI flickering and increased component load, especially on low-performance devices.

Steps to Reproduce

  1. Wrap a lazy-loaded component inside <Suspense fallback={<Spinner />}>.
  2. Simulate a slow network response (2–5 seconds delay).
  3. Observe multiple re-renders of the fallback UI in the console.

Expected Behavior

The fallback component should ideally render once and remain stable until the lazy component resolves.

Actual Behavior

The fallback re-renders several times durin

kl2400033266 avatar Nov 26 '25 10:11 kl2400033266

It doesn't look like this bug report has enough info for one of us to reproduce it.

Please provide a CodeSandbox (https://react.new), or a link to a repository on GitHub.

Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

eps1lon avatar Nov 26 '25 11:11 eps1lon

It is an AI crap throwing user, also poluting my repo.

buhtz avatar Nov 27 '25 12:11 buhtz