-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[Bug]: fetcher.load revalidate when navigation submit without running revalidate function #11723
Comments
Could you put together a minimal reproduction of the issue you're seeing so we can be sure we understand the problematic behavior? |
@brophdawg11 This a sandbox for a demo to reproduce.
I have one So when I trigger navigate first time, because of this line, the fetcher will be revalidate even if I return false in react-router/packages/router/router.ts Line 4397 in 77fca6e
So I think we need to delete the key from Also when I quickly click the navigate1 and navigate2 button in the demo, sometimes there is an error in the console. |
@brophdawg11 Sorry, now I set the devbox to public access: https://codesandbox.io/p/devbox/react-router-test-forked-6nmdty |
@brophdawg11 Hello. Could you please take a look at this? |
Thanks for the repro! |
This should be resolved by #11839 and available in the next release 👍 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of React Router are you using?
6.23.0
Steps to Reproduce
The permission loader revalidates without running revalidate function in the config.
I dig into the source code.I found it go into this if condition.The loader was canceled because of action submit in this Component.But I found finally the loader is fulfilled and can get data from fetcher. I think maybe it should be deleted from the cancelledFetcherLoads array.Is there any race condition issue?
react-router/packages/router/router.ts
Line 4397 in 77fca6e
Expected Behavior
The loader should determine if revalidate through the revalidate function.
Actual Behavior
The loader revalidate when navigation.
The text was updated successfully, but these errors were encountered: