-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Possible Bug]: shouldRevalidate never fires #10774
Comments
Can you provide a reproduction? This behaves as expected in my reproduction: https://codesandbox.io/s/eloquent-mopsa-jqmmjv?file=/src/index.js |
When navigating from
I'm not seeing this behavior on code sandbox or locally, and your console log above never shows the root loader re-executing. Can you provide a reproduction of this?
Yes, back/forward and Link navigations handle loaders the same. I'm going to close this out since it seems everything is working correctly w.r.t. loaders and revalidations. Happy to re-open though if we can find a reliable reproduction of an issue. |
What version of React Router are you using?
6.14.2
Steps to Reproduce
Expected Behavior
I expected to see "Root route shouldRevalidate callback fired." in the console log upon returning to the "/" route. I also expected the "/" loader wouldn't fire.
I expected to see "Child route shouldRevalidate callback fired." in the console log upon returning to the "/:slug" route. I also expected the "/:slug" loader wouldn't fire.
Actual Behavior
loader
callbacks on all routes fire on every navigation.shouldRevalidate
callbacks never appear to fire.The text was updated successfully, but these errors were encountered: