react-router
react-router copied to clipboard
[Bug]: Manual revalidation interrupting action revalidation and causing stuck loading state
What version of React Router are you using?
6.12.0
Steps to Reproduce
This is a stub issue for a scenario reported by a user in Discord. It's in their Remix app but the core logic should be all coming from RR. We do not have a specific reproduction available.
Discord message: https://discord.com/channels/770287896669978684/1099009947422953553/1099077077979893800
Best guess at what's happening:
If your useNavigation hook was hanging on loading, it sounds like maybe:
- post action (state = submitting)
- acton returns redirect
- loaders kick off (state = loading)
- revalidation interrupts
- stuck in loading?
Expected Behavior
A polling revalidator should not interfere with an action-driven set of revalidations
Actual Behavior
It seems that in some specific flow, the useRevalidator-driven revalidation can leave useNavigation stuck in a loading state after an action navigation.