I'm trying to find a way to reset the badge to not show if for example, the amount of notifications is 0. In iOS, it's as simple as pass null to badge. But on android, it doesn't remove it.
let badgeValue = null;
if (totalUnread > 0) {
badgeValue = totalUnread > 9? '9+' : `${totalUnread}`
}
Navigation.mergeOptions('MessageScreen', {
bottomTab: {
badge: badgeValue
}
});
What other ways I can use to achieve this?
@msqar You gotta pass an empty string ''.
@ItsNoHax Mmmm i think i tested that and didn't work that's why i started passing null but i will give it a try again whenever i get home. Thanks!
@msqar Just double checked my app's code and I can verify empty string is correct! Let me know if you need anything else :)
@ItsNoHax lol you were right. Dunno what happened before. But now it is working. Thanks man.
Most helpful comment
@msqar You gotta pass an empty string ''.