Last active
May 29, 2018 17:35
-
-
Save HigoRibeiro/6b0cd3c5edb613747b9d59792ec4c1c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Button, Text } from 'react-native'; | |
import { createStackNavigator } from 'react-navigation'; | |
const Page1 = ({ navigation }) => ( | |
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | |
<Text>Home ;D</Text> | |
<Button title={() => { navigation.navigate('About'); }} /> | |
</View> | |
); | |
Page1.navigationOptions = { | |
title: 'Home', | |
}; | |
const Page2 = () => ( | |
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | |
<Text>About</Text> | |
</View> | |
); | |
Page2.navigationOptions = { | |
title: 'About', | |
}; | |
export default createStackNavigator({ | |
Home: Page1, | |
About: Page2, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment