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
When the currently focused route is replaced using Expo Router's
router.replace(), Blank Stack can retain the replaced route as the screen
underneath the new route during an interactive back gesture.
Given the navigation flow:
A --push--> B --replace--> C
the resulting history is [A, C]. Swiping back from C should therefore reveal A.
Instead, the gesture reveals B. Once the gesture completes, navigation correctly
finishes on A, causing a visible snap from B to A.
The navigation state itself appears to be correct. The issue seems limited to
the screen used as the previous/underlying screen during the interactive
transition.
0827.mp4
Reproduction steps
Run npm install.
Run npx expo start and open the app.
Tap A to navigate to B using router.push("/b").
Tap B to replace it with C using router.replace("/c").
Start an interactive back gesture from C without immediately completing it.
Expected:
A is visible underneath C during the gesture.
Actual:
B is visible underneath C during the gesture. After completing the gesture,
the navigator correctly lands on A, causing a visible snap from B to A.
Version
v3
Stack
Blank Stack
Reanimated Version
v4
Platforms
Android
What happened?
When the currently focused route is replaced using Expo Router's
router.replace(), Blank Stack can retain the replaced route as the screen
underneath the new route during an interactive back gesture.
Given the navigation flow:
A --push--> B --replace--> C
the resulting history is [A, C]. Swiping back from C should therefore reveal A.
Instead, the gesture reveals B. Once the gesture completes, navigation correctly
finishes on A, causing a visible snap from B to A.
The navigation state itself appears to be correct. The issue seems limited to
the screen used as the previous/underlying screen during the interactive
transition.
0827.mp4
Reproduction steps
npm install.npx expo startand open the app.router.push("/b").router.replace("/c").Expected:
A is visible underneath C during the gesture.
Actual:
B is visible underneath C during the gesture. After completing the gesture,
the navigator correctly lands on A, causing a visible snap from B to A.
Relevant navigation code:
Blank Stack configuration:
Reproduction sample
https://github.com/Kokapuk/react-native-screen-transitions-expo-router-bug