You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i navigate from secreen to other, the previous one re-rendered, why??? is it normal and how can i prevent the current screen from re-rendered when i navigate to other
thanks
Expected Behavior
When i navigate from secreen to other, the previous one re-rendered
Actual Behavior
Prevent the current screen from re-rendered when i navigate to other
The text was updated successfully, but these errors were encountered:
TonyFTannous
changed the title
Previous page rerendered when navigate to the other when using defer, useLoaderData [Bug]:
Previous page re-rendered when navigate to the other when using defer, useLoaderData [Bug]:
Aug 2, 2023
This is expected behavior. When you navigate, React Router updates useNavigation().state from idle to loading and remains on the current page while the loaders run for the next page. This causes the current page to re-render so that it can show any pending/optimistic UI based on useNavigation().
What version of React Router are you using?
6.14.2
Steps to Reproduce
I use useLoaderData, defer and Suspense/await ...
when i navigate from secreen to other, the previous one re-rendered, why??? is it normal and how can i prevent the current screen from re-rendered when i navigate to other
thanks
Expected Behavior
When i navigate from secreen to other, the previous one re-rendered
Actual Behavior
Prevent the current screen from re-rendered when i navigate to other
The text was updated successfully, but these errors were encountered: