该导航器缺少导航道具。在react-navigation 3中,您必须直接设置应用容器

时间:2019-03-03 00:00:50

标签: javascript reactjs navigation native base

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { createDrawerNavigator } from 'react-navigation'
import HomeScreen from './screens/HomeScreen'
import SettingsScreen from './screens/SettingsScreen'
//import { Container, Header, Content, Footer, FooterTab, Button, Text } from 'react native-base';


export default class App extends React.Component {
    render() {
        return (
            <AppDrawerNavigation/>
    );
    }
}

const AppDrawerNavigation = createDrawerNavigator({
    Home: HomeScreen,
    Settings: SettingsScreen
})





const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
    },
});

0 个答案:

没有答案