I have added actions to my app's notifications using this workaround. However, when I press on any action, the notification remains there. I would like it to go away. Is there any way to do it?
Okay, I have found a way to make it work. Adding the line PushNotification.clearLocalNotification(id) dismisses the notification when an action is tapped. Like this:
PushNotification.configure({
onNotification: notification => {
. . .
PushNotification.clearLocalNotification(notification.id)
},
. . .
})
Most helpful comment
Okay, I have found a way to make it work. Adding the line
PushNotification.clearLocalNotification(id)dismisses the notification when an action is tapped. Like this: