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
I've migrated from Remix to React Router v7, and read that the default behaviour has changed where loaders will now always re-run by default.
Developers should now make use of the shouldRevalidate function to ensure those don't re-run in cases where this is not wanted. What I couldn't find in the documentation, is what the default behaviour was pre-single fetch. I have a root loader which is quite intense in terms of loading time and having to figure out the default behaviour has been quite hard as I'm running into scenario's where the root loader is revalidating where I don't want it too and the same for requests that shouldn't revalidate and is doing so.
Is there a code snippet somewhere that helps developers use the pre single fetch behaviour for revalidations?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey 👋
I've migrated from Remix to React Router v7, and read that the default behaviour has changed where loaders will now always re-run by default.
Developers should now make use of the
shouldRevalidate
function to ensure those don't re-run in cases where this is not wanted. What I couldn't find in the documentation, is what the default behaviour was pre-single fetch. I have a root loader which is quite intense in terms of loading time and having to figure out the default behaviour has been quite hard as I'm running into scenario's where the root loader is revalidating where I don't want it too and the same for requests that shouldn't revalidate and is doing so.Is there a code snippet somewhere that helps developers use the pre single fetch behaviour for revalidations?
Beta Was this translation helpful? Give feedback.
All reactions