Created
June 4, 2022 08:09
-
-
Save itsramiel/d427f96dcc6a35c931689a2dabde3078 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 { Button, StyleSheet, Text, View } from "react-native"; | |
import React from "react"; | |
import { ProfileProps } from "../navigation/types"; | |
import { event } from "../event"; | |
const Profile = ({ route }: ProfileProps) => { | |
const { eventName } = route.params; | |
return ( | |
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}> | |
<Button title="call passed callback" onPress={() => event.emit(eventName)} /> | |
</View> | |
); | |
}; | |
export default Profile; | |
const styles = StyleSheet.create({}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment