I have simple footerTab where I would like to show badge if there is notifications.
<Button active={ this.props.ui.selectedTab === 'notifications' ? true : false }
onPress={ () => this.selectedTab('notifications') }
{ ...this.props.ui.notifications ? badge : null }
>
{ this.props.ui.notifications ?
<Badge><Text style={{ color:'white' }}>{this.props.ui.notifications}</Text></Badge> : null
}
<Icon name='md-notifications' />
</Button>
With this code I'm getting 'badge is not defined'
How I can pass that badge property for Button ?