Skip to content

Instantly share code, notes, and snippets.

View alperbayram's full-sized avatar
🍊

Alper Bayram alperbayram

🍊
View GitHub Profile
//app/(tabs)/user/users.tsx
import { Text, View, Image } from "react-native";
import { Link, Stack } from "expo-router";
import { styles } from "../../../styles/styles";
export default function Page() {
const avatar1 = "https://avatars.githubusercontent.com/u/9664363?v=4";
const avatar2 = "https://avatars.githubusercontent.com/u/43719324?v=4";
return (
<View style={styles.container}>
//app/(tabs)/user/[id].tsx
import { View, Text, Image } from "react-native";
import { useLocalSearchParams, Stack, usePathname } from "expo-router";
import { styles } from "../../../styles/styles";
export default function Page() {
const pathname = usePathname();
const local = useLocalSearchParams();
return (
//app/(tabs)/user/_layout.tsx
import { Stack, router } from "expo-router";
import { Button } from "react-native";
export default function Layout() {
return (
<Stack>
<Stack.Screen
name="users"
options={{
//app/(tabs)/settings.tsx
import { View, Text } from "react-native";
import { styles } from "../../styles/styles";
export default function Page() {
return (
<View style={styles.container}>
<View>
<Text style={styles.subtitle}>app/(tabs)/settings.tsx</Text>
</View>
//app/(tabs)/profile.tsx
import { View, Text } from "react-native";
import { styles } from "../../styles/styles";
import { Link } from "expo-router";
export default function Page() {
return (
<View style={styles.container}>
<View>
<Text style={styles.subtitle}>app/(tabs)/profile.tsx</Text>
import { Tabs } from "expo-router";
export default function Layout() {
return (
<Tabs>
<Tabs.Screen
name="settings"
options={{
title: "settings",
headerTitle: "Settings",
//app/(tabs)/_layout.tsx
import { Tabs } from "expo-router";
export default function Layout() {
return (
<Tabs>
<Tabs.Screen
name="user"
options={{
headerShown: false,
//app/index.tsx
import { View, Text } from "react-native";
import { Link } from "expo-router";
import { styles } from "../styles/styles";
export default function Page() {
return (
<View style={styles.container}>
<View>
<Text style={styles.subtitle}>app/index.tsx</Text>
@alperbayram
alperbayram / modal.tsx
Created December 14, 2023 20:37
modal
import { View, Text } from "react-native";
import { styles } from "../styles/styles";
export default function Page() {
return (
<View style={styles.container}>
<View>
<Text style={styles.subtitle}>app/modal.tsx</Text>
</View>
</View>
@alperbayram
alperbayram / _layout.tsx
Created December 14, 2023 20:33
_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={{