大神来看下,help



  • 0_1527063432114_QQ截图20180523161644.png
    LoginScene是登陆界面,Checker是主界面
    import React, {Component} from 'react';
    import {View, Text, Platform, AsyncStorage, Alert,AppState} from 'react-native'
    import {createStackNavigator} from 'react-navigation';
    import {createSwitchNavigator} from 'react-navigation';
    import LoginScene from "./src/scene/LoginScene";
    import CheckerScene from "./src/scene/Checker";

    export default class App extends Component {
    render() {
    return (
    <AppNavigator/>
    );
    }
    }
    const AppNavigator = createStackNavigator({
    Login: {screen: LoginScene},
    Checker: {screen: CheckerScene},
    }, {
    initialRouteName: 'Login',
    headerMode: 'none',
    /*
    * Use modal on iOS because the card mode comes from the right,
    * which conflicts with the drawer example gesture
    */
    mode: Platform.OS === 'ios' ? 'modal' : 'card',
    }
    );



  • 你试试直接export default AppNavigator, 不需要在上边再创建Component导出了