Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_deleteReminder = async (reminderId: string) => {
try {
const { calendar } = this.props.navigation.state.params!;
await Calendar.deleteReminderAsync(reminderId);
Alert.alert('Reminder deleted successfully');
this._findReminders(calendar.id!);
} catch (e) {
Alert.alert('Reminder not deleted successfully', e.message);
}
}