I am using Ionic React and am trying to add a IonBadge for a IonTabButton:
<IonTabButton tab="d" href="/chat">
<IonIcon icon={chatbubblesOutline} />
<IonText>Chats</IonText>
<IonBadge color="primary">{Number(unreadMessages)}</IonBadge>
<IonTabButton>
However, even when unreadMessages
is updating, the badge number does not change. I have tried this behaviour with other components (not IonTab), and the badge count updates correctly. Any reason why IonBadge isn’t updating when wrapped in an IonTabButton?