You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is the default safari behavior, this seems more like a mobile issue vs react router.
Not sure, but I wonder if this could be whats happening.
When you move from page to page, the native swipe back gesture safari has is what you have shown above. The page before I like to think of it like an image, safari is just revealing it.
So the route changes when you release the gesture. Once you let go, safari triggers the browser navigation, but since this is all the same webapp, this ultimately results in a react router navigate(-1). During the time between triggering the navigate, the page hasnt changed yet, so the browser draws the current page. Then very quickly, the back navigation is triggered. I think thats why you get a blip of the previous page.
When you call it directly, YOU are navigating immediately. Thats why it works fine there.
What version of React Router are you using?
6.14.2
Steps to Reproduce
I have a router defined such as this:
When I navigate in the application using swipe gestures, the screen flickers for a second.
This does not happen when
navigate(-1)
is called, but only occurs when gestures are used to navigate between screensExpected Behavior
It should not flicker!
Actual Behavior
RPReplay_Final1694546587.MP4
The text was updated successfully, but these errors were encountered: