text: /**
   * 登录状态获取前的 LOADING
   * 
   * Created by 材主<diamont1001@163.com> on 2019/04/19.
   */
  
  import React, {Component} from 'react';
  import {StyleSheet, SafeAreaView, View, ActivityIndicator, StatusBar} from 'react-native';
  import AsyncStorage from '@react-native-community/async-storage';
  
  type Props = {};
  export default class AuthLoadingScreen extends Component<Props> {
    constructor(props) {
      super(props);
      this._bootstrapAsync();
    }
  
    // Fetch the token from storage then navigate to our appropriate place
    _bootstrapAsync = async () => {
      const userToken = await AsyncStorage.getItem('userToken');
  
      // This will switch to the App screen or Auth screen and this loading
      // screen will be unmounted and thrown away.
      this.props.navigation.navigate(userToken ? 'App' : 'Auth');
    };
  
    render() {
      return (
        <SafeAreaView style={styles.container}>
          <ActivityIndicator />
          <StatusBar barStyle="default" />
        </SafeAreaView>
      )
    }
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      alignItems: 'center',
      justifyContent: 'center',
    },
  });