Skip to content
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]: unstable_patchRoutesOnNavigation doesn't handle multiple click correctly while loading #12012

Closed
Wykks opened this issue Sep 19, 2024 · 2 comments · Fixed by #12055
Closed
Labels
awaiting release This issue have been fixed and will be released soon bug

Comments

@Wykks
Copy link

Wykks commented Sep 19, 2024

What version of React Router are you using?

6.26.2

Steps to Reproduce

https://stackblitz.com/edit/github-tgrtuk-oqthfq?file=src%2Fapp.tsx

Expected Behavior

When doing an async work in unstable_patchRoutesOnNavigation, the page change should match the patched route, even when a second navigation start at the same url while unstable_patchRoutesOnNavigation is still running.

Actual Behavior

When you click on the link to /test, the routing works fine after 1sec, but if you do double click, it goes to the 404 page.

unstable_patchRoutesOnNavigation is called once, but the second routing forever "associate" the /test page to the 404 page (try to navigate back and go to /test again,), until you restart the app.

@Wykks Wykks added the bug label Sep 19, 2024
@brophdawg11 brophdawg11 linked a pull request Oct 1, 2024 that will close this issue
@brophdawg11 brophdawg11 added the awaiting release This issue have been fixed and will be released soon label Oct 2, 2024
Copy link
Contributor

github-actions bot commented Oct 9, 2024

🤖 Hello there,

We just published version 6.27.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 6.27.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue have been fixed and will be released soon bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants