Created
August 22, 2017 22:39
-
-
Save Ravenclaw968/7c4538e4331fb16757003f4c10922a36 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 from 'react'; | |
import { AppRegistry, StyleSheet, Text, View, AsyncStorage } from 'react-native'; | |
import { StackNavigator } from 'react-navigation'; | |
import HomeScreen from './screens/HomeScreen'; | |
import UserScreen from './screens/users/UserScreen'; | |
export default class App extends React.Component { | |
async getId() | |
{ | |
return await AsyncStorage.getItem("id"); | |
} | |
render() { | |
if (this.getId() !== null && this.getId() !== "") | |
{ | |
return ( | |
<HomeScreen></HomeScreen> | |
); | |
} | |
else | |
{ | |
return ( | |
<UserScreen></UserScreen> | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment