Created
May 26, 2018 10:00
-
-
Save suhanlee/ce9212001f54c6a9b1c763132b7b0936 to your computer and use it in GitHub Desktop.
react navigation example
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
// In App.js in a new project | |
import React from 'react'; | |
import { View, Text } from 'react-native'; | |
import { createStackNavigator } from 'react-navigation'; | |
class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
</View> | |
); | |
} | |
} | |
export default createStackNavigator({ | |
Home: { | |
screen: HomeScreen | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment