SHARE
TWEET

Untitled

a guest Jul 17th, 2017 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { AppRegistry, AsyncStorage, Text, View } from 'react-native';
  3. import { StackNavigator } from 'react-navigation';
  4. import Login from './Login';
  5.  
  6. const CREDS_KEY = 'CREDS'
  7. AsyncStorage.getItem(CREDS_KEY).then((creds) => {
  8.   if (!creds) {
  9.    
  10.   } else {
  11.    
  12.   }
  13. });
  14.  
  15. class LoginScreen extends React.Component {
  16.   static navigationOptions = {
  17.     title: "Login",
  18.   };
  19.   render() {
  20.     return (
  21.       <View>
  22.       <Text>Login Screen</Text>
  23.       <Login/>
  24.       </View>
  25.     );
  26.   }
  27. }
  28.  
  29. class ChatScreen extends React.Component {
  30.   static navigationOptions = {
  31.     title: "Chat",
  32.   };
  33.   render() {
  34.     return (
  35.       <View>
  36.       <Text>Chat Screen</Text>
  37.       </View>
  38.     );
  39.   }
  40. }
  41.  
  42. const Root = StackNavigator({
  43.   Login: { screen: LoginScreen },
  44.   Chat: { screen: ChatScreen },
  45. });
  46.  
  47. AppRegistry.registerComponent('yetaproto', () => Root);
RAW Paste Data
Top