Skip to content

Instantly share code, notes, and snippets.

@alperbayram
Created December 15, 2023 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alperbayram/08f698787c56f0d7324bd16adb7d52db to your computer and use it in GitHub Desktop.
Save alperbayram/08f698787c56f0d7324bd16adb7d52db to your computer and use it in GitHub Desktop.
//app/_layout.tsx
import { Stack, router } from "expo-router";
import { Button } from "react-native";
export default function Layout() {
return (
<Stack>
<Stack.Screen name="index" options={{ headerShown: false }} />
<Stack.Screen
name="modal"
options={{
presentation: "modal",
headerLeft: () => (
<Button title="Close" onPress={() => router.back()} />
),
}}
/>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
</Stack>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment