Created
December 27, 2020 17:25
-
-
Save ShanikaNishadhi/9ebb8bab53b648766440d985cf039e3d to your computer and use it in GitHub Desktop.
This file contains 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
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