Файл _layout.tsx< Компонент /strong> отображается с заголовком, но не более того.
Я проверил карту сайта, index.tsx распознается, поэтому не знаю, почему он не распознается. рендерить?
здесь это структура моего приложения
Код: Выделить всё
app/
├── (location)/
| ├── _layout.tsx
| ├── index.tsx
├── (stores)/
| ├── _layout.tsx
| ├── index.tsx
├── _layout.tsx
├── index.tsx
├── searchStores.tsx
Код: Выделить всё
router.push(`/(location)`);
< pre class="snippet-code-js lang-js Prettyprint-override">
Код: Выделить всё
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
import { useRouter } from "expo-router";
import { Ionicons } from "@expo/vector-icons";
const Header = ({
title,
onBackPress,
}: {
title: string,
onBackPress: () => void,
}) => {
return (
{title}
);
};
export default function Layout() {
const router = useRouter();
const handleBackPress = () => {
router.navigate("/searchStores");
};
return ;
}
const styles = StyleSheet.create({
header: {
flexDirection: "row",
alignItems: "center",
padding: 10,
backgroundColor: "#f8f8f8",
},
backButton: {
marginRight: 50,
marginLeft: 10,
},
title: {
fontSize: 20,
fontWeight: "bold",
},
});
Вот файл index.tsx, который я пытаюсь визуализировать:
Вот файл index.tsx, который я пытаюсь визуализировать:
Вот файл index.tsx, который я пытаюсь визуализировать:
Вот файл index.tsx, который я пытаюсь визуализировать:
Вот файл index.tsx, который я пытаюсь визуализировать:
Вот файл index.tsx, который я пытаюсь визуализировать:
p>
Код: Выделить всё
import { View, Text } from "react-native";
const Index = () => {
return (
test screen
);
};
export default Index;
Подробнее здесь: https://stackoverflow.com/questions/793 ... expo-route