Newer
Older
import React from "react";
import { View, Text, StyleSheet, Button } from "react-native";
export default function Detail (props) {
const {route,navigation}=props
console.log(route.params.name)
const goTo = () => navigation.navigate("stackMap");
return (
<View style={styles.container}>
<Text>Home screen</Text>
<Button onPress={goTo} title={`Go to maps`} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "azure",
alignItems: "center",
justifyContent: "center",
},
});