我是本机反应的新手,我实现了一个简单的本机抽屉,但是当我在模拟器中运行此代码时,它给我带来类型错误。
这是我的 drawr.js 代码:
import React, { Component } from 'react';
import {View,Text,FlatList} from "react-native";
import {Card} from "react-native-paper";
import {DrawerNavigator} from 'react-navigation'
import lessons from './lessons';
import classes from './classes';
class Drawer extends React.Component{
render() {
return (
<MyApp/>
);
}
}
const MyApp = DrawerNavigator({
lessons:{
screen:lessons
}
})
export default Drawer;
然后我收到此错误:
如何解决此错误?