Skip to content

Instantly share code, notes, and snippets.

@drmas
Last active April 22, 2017 10:29
Show Gist options
  • Save drmas/44a836560e128746b49db0fc486c5cf1 to your computer and use it in GitHub Desktop.
Save drmas/44a836560e128746b49db0fc486c5cf1 to your computer and use it in GitHub Desktop.
import React from 'react'
import {
View,
StatusBar,
Platform
} from 'react-native'
import {Scene, Router} from 'react-native-router-flux';
import HomeScreen from './screens/home'
import ProductsScreen from './screens/products'
export default class App extends React.Component {
render() {
return <View style={styles.container} >
<StatusBar barStyle='light-content'/>
<Router>
<Scene key="root"
navigationBarStyle={styles.navBar}
titleStyle={styles.title}>
<Scene
key="home"
component={HomeScreen}
title="Open Commerce"
/>
<Scene
key="products"
component={ProductsScreen}
getTitle={props => props.name}
/>
</Scene>
</Router>
</View>
}
}
const styles = {
container: {
flex: 1,
marginTop: Platform.OS == 'android' ? 22 : 0
},
navBar: {
backgroundColor: '#52B9D1',
},
title: {
color: 'white'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment