When I'm on the home page and I go to the profile and then to the post page and then I try to go back 2 times with a quick gesture, I get this kind of situation. When I go from the post page to the profile and then to the home page, it goes back to the profile and then back to the home page. I can understand it can be a bit confusing :D
Video
This is my layout
import { Stack } from "expo-router";
const HomeLayout = () => {
return (
<Stack
screenOptions={{
headerShown: false,
fullScreenGestureEnabled: true,
gestureEnabled: true,
}}
>
<Stack.Screen
name="index"
options={{
title: "Home",
}}
/>
<Stack.Screen
name="[postID]"
options={{
title: "Post",
}}
/>
<Stack.Screen
name="profile/[userID]"
options={{
title: "Profile",
}}
/>
</Stack>
);
};
export default HomeLayout;
I also tried setting gestureEnabled: false
when leaving that page with useFocusEffect
, but this method did not work either