To display notifications badge, I found out I can use tabBarBadge from react-navigation. tabBarBadge accepts only a number or a string and not a function, so I couldn't figure out a way to disable it when the user is focused on the notifications screen. How can I disable it?
In the tabBarIcon there is tabInfo.focused that lets us know when the user is on this screen. Is there a similar method for tabBarBadge?