Skip to content

Instantly share code, notes, and snippets.

@brookslyrette
Created August 20, 2017 19:30
Show Gist options
  • Select an option

  • Save brookslyrette/cb518e4f15e13d70280e380f484c72e7 to your computer and use it in GitHub Desktop.

Select an option

Save brookslyrette/cb518e4f15e13d70280e380f484c72e7 to your computer and use it in GitHub Desktop.
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StackNavigator } from 'react-navigation';
const Screen1 = () => (<View style={styles.container}><Text>Screen 1</Text></View>)
const Screen2 = () => (<View style={styles.container}><Text>Screen 2</Text></View>)
const Screen3 = () => (<View style={styles.container}><Text>Screen 3</Text></View>)
const Navigator = StackNavigator({
Screen1: { screen: Screen1 },
Screen2: { screen: Screen2 },
Screen3: { screen: Screen3 },
}, {
navigationOptions: {
headerTitle: 'Default App Title',
headerTitleStyle: {
color: '#FFF'
},
headerStyle: {
backgroundColor: '#f57c00'
},
headerBackTitle: null,
headerTintColor: '#FFF',
}
});
export default class App extends React.Component {
render() {
return (
<Navigator/>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment