Tell us which versions you are using:
This is actual a question instead of an issue, and I searched closed issues but I cant find an answer.
Basically I am wondering if scene (when used as tab) supports badge number (I think the answer is no.)
From my understanding, even if badge number is supported (or custom compoent), it won't get updated with state changed since router cant be re-rendered via redux connect.
So, is my only option to make my own tabbar component and wire actions for each tab, and only use router to render my first tab?
Thanks in advance.
We (my company) actually implemented it..
You need to connect your icon component to redux and it works great..
import YourTabIcon from './YourTabIcon';
const mapStateToProps = state => {return {badgeCount: state.notifications.count};};
const ConnectedYourTabIcon = connect(mapStateToProps)(YourTabIcon);
// ...
<Scene key="yourTab" icon={ConnectedYourTabIcon} hideNavBar>
and in YourTabIcon you can implement your badge :)
@atlanteh Thank you! Work like a charm!
Most helpful comment
We (my company) actually implemented it..
You need to connect your icon component to redux and it works great..
and in YourTabIcon you can implement your badge :)