Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import _ from 'lodash'
- ...
- TAB_WALLET: {
- screen: createStackNavigator({
- Wallet: {
- ...
- }
- }),
- // Start here
- navigationOptions: ({ navigation }) => {
- const walletScreen = navigation.state.routes.find(
- obj => obj.routeName === 'Wallet'
- )
- const isTabBarVisible = !_.get(
- walletScreen,
- 'params.isWalletDropdownVisible'
- )
- return {
- tabBarVisible: isTabBarVisible,
- tabBarLabel: 'Wallet',
- tabBarIcon: ({ focused }) => (
- <Icon name='ios-wallet' focused={focused} />
- )
- }
- }
- // End here
- }
- ...
Add Comment
Please, Sign In to add comment