I have a tabNavigator nested in a drawerNavigator parent. In the drawerNavigator is have a custom content screen which is a favourite list.
What I'm trying to achieve is when the drawer is triggered open the favourite list in reloaded.
I'm passing navigator params from the drawerNavigator to the tabNavigator but when I try to pass from tabNavigator to drawerNavigator it's undefined.
How can I pass a navigation param from LaunchScreen into the DrawerScreen?
export const PrimaryNav = TabNavigator({
Home: {
screen: LaunchScreen,
navigationOptions: {
swipeEnabled: false,
tabBarIcon: ({ tintColor }) => (
<Image
style={[styles.icon]}
source={require('../Images/img.png')}
/>
),
},
},
Map: {
screen: FirstScreen,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<Image
source={require('../Images/img1.png')}
style={[styles.icon]}
/>
),
},
},
},
{
headerMode: 'none',
tabBarPosition: 'top',
animationEnabled: true,
tabBarOptions: {
showIcon: true,
showLabel: false,
activeTintColor: '#ffffff',
indicatorStyle: {
borderBottomColor: '#33b2f4',
borderBottomWidth: 3,
},
style: {
backgroundColor: '#000',
paddingTop:20,
}
},
});
const MyDrawerNavigator = DrawerNavigator({
Home: {
screen: PrimaryNav
},
}, {
contentComponent: DrawerScreen
});
export default MyDrawerNavigator