Skip to content

Instantly share code, notes, and snippets.

@itsramiel
Created June 4, 2022 08:09
Show Gist options
  • Save itsramiel/d427f96dcc6a35c931689a2dabde3078 to your computer and use it in GitHub Desktop.
Save itsramiel/d427f96dcc6a35c931689a2dabde3078 to your computer and use it in GitHub Desktop.
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