react-router
react-router copied to clipboard
[Bug]: Blink on fast left/right swipes in mobile
What version of React Router are you using?
v6.20.1
Steps to Reproduce
I had this issue with my own app built with react router, but I found that it also exists on the react router official site.
Use iPhone/iPad to browse https://reactrouter.com (with either Safari or Chrome), click What's New?, then perform a fast left swipe. After going back to the home page, perform a fast right swipe. Repeat several times.
Expected Behavior
Swipes should be smooth navigations with no unexpected behaviors.
Actual Behavior
The page blinks within 1 second whenever a swipe is performed.
- The issue also persists on ipad, but not mac.
- If the swipe goes slower then there's likely no flicker.
- Using the forward/back button will not lead to a flicker.
- The flicker happens most intensively when swiping from a page with a list of items.
- I tried global pending UI, but it does not help.
- I tested also on https://react.dev/, there's no flicker.
It looks more like a Safari bug with client-side routing. Some cache issues on swipes