1

I am using lazy loading in React, when lazy load starts, along with loading spinner that is used inside Suspense, I also need to keep the old UI in place and update the UI when the loading is done.

Right now I am losing the old UI but able to see the loading spinner, I need both old UI and loading spinner to show. How to achieve this in React functional approach or Hooks.

skyboyer
  • 22,209
  • 7
  • 57
  • 64
gopinath krm
  • 69
  • 1
  • 8
  • Can you please provide some code? What you're trying to do can be achieved with React 18 `startTransition` but it depends on the conditions in which your lazy loaded component will be rendered. – ivanatias Jun 22 '22 at 22:18

0 Answers0