Skip to content

Instantly share code, notes, and snippets.

@horacioh
Last active April 1, 2018 22:36
Show Gist options
  • Save horacioh/dce89bafdf65da4c211d5e69bd4c9f7f to your computer and use it in GitHub Desktop.
Save horacioh/dce89bafdf65da4c211d5e69bd4c9f7f to your computer and use it in GitHub Desktop.
RN Scaffold - PrivateNavigator.js
// MyApp/src/app/navigators/PrivateNavigator.js
// @flow
import * as React from 'react'
import { TabNavigator } from 'react-navigation'
import { Icon } from 'react-native-elements'
import HomeNavigator from '../../home/HomeNavigator'
import { HOME_ROUTE } from './routes'
const PrivateRootNavigator: React.ComponentType<any, any> = TabNavigator({
[HOME_ROUTE]: {
screen: HomeNavigator,
navigationOptions: {
title: "Home",
tabBarIcon: ({tintColor}) => (
<Icon name="home" color={tintColor} size={32} />
)
}
}
})
export default PrivateRootNavigator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment