Skip to content

Instantly share code, notes, and snippets.

@tonyvu2014
Created June 10, 2018 07:53
Show Gist options
  • Save tonyvu2014/b0589bb4c16ae79a6f8250dfef3430e7 to your computer and use it in GitHub Desktop.
Save tonyvu2014/b0589bb4c16ae79a6f8250dfef3430e7 to your computer and use it in GitHub Desktop.
Stack and Tab Navigator
const FeedsStack = StackNavigator({
Feeds: {
screen: FeedsScreen,
navigationOptions: {
title: 'Feeds'
},
},
Reader: {
screen: ReaderScreen,
navigationOptions: {
title: 'Article'
}
},
});
const Root = TabNavigator (
{
Feeds: {
screen: FeedsStack,
navigationOptions: {
tabBarLabel: 'Feeds',
tabBarIcon: ({ tintColor }) => <Icon name='list' size={35} color={tintColor}/>
},
},
Preferences: {
screen: PreferencesScreen,
navigationOptions: {
tabBarLabel: 'Preferences',
tabBarIcon: ({tintColor}) => <Icon name='account-circle' size={35} color={tintColor} />
},
},
},
{
tabBarPosition: 'bottom',
tabBarOptions: {
style: {
height: 50
}
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment