Created
June 4, 2022 07:37
-
-
Save itsramiel/2ab8cbbde9b7cec8e5025ef9ae462623 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Alert, Button, StyleSheet, Text, View } from "react-native"; | |
import React from "react"; | |
import { HomeProps } from "../navigation/types"; | |
const Home = ({ navigation }: HomeProps) => { | |
const congratulateUser = () => { | |
Alert.alert("Here is a congratulations for following this tutorial and this function is written in Home"); | |
}; | |
return ( | |
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}> | |
<Button title="go to profile" onPress={() => navigation.navigate("Profile", { callback: congratulateUser })} /> | |
</View> | |
); | |
}; | |
export default Home; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment