Skip to content

Instantly share code, notes, and snippets.

@ShanikaNishadhi
Created December 27, 2020 17:25
Show Gist options
  • Save ShanikaNishadhi/9ebb8bab53b648766440d985cf039e3d to your computer and use it in GitHub Desktop.
Save ShanikaNishadhi/9ebb8bab53b648766440d985cf039e3d to your computer and use it in GitHub Desktop.
const App = () => {
return(
<View style={styles.container}>
<Text>Push Notifications</Text>
<TouchableOpacity
activeOpacity={0.6}
//calling showNotifications
onPress={ ()=> showNotifications('hello', 'message')}>
<View style={styles.button}>
<Text style={styles.buttonTitle}>Click me to get notification</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={0.6}
//calling handleScheduleNotifications
onPress={ ()=> handleScheduleNotifications('Hi', 'Showed after 5 sec')}>
<View style={styles.button}>
<Text style={styles.buttonTitle}>Click me to get notification after 5sec.</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={0.6}
//calling handleCancel
onPress={ ()=> handleCancel()}>
<View style={styles.button}>
<Text style={styles.buttonTitle}>Click me to cancel all notifications</Text>
</View>
</TouchableOpacity>
</View>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment