我使用了React导航模块,我创建了DrawerContent,并得到了以下错误:
Check the render method of "Drawer Sidebar"
如何纠正此错误?

默认代码是ok:
contentComponent: props => <ScrollView><DrawerItems {...props} /></ScrollView>
我的新代码不好:
contentComponent: DrawerContent
和
const DrawerContent = (props) => (<ScrollView><DrawerItems {...props} /></ScrollView>)
我也打开了这个问题:(https://github.com/react-community/react-navigation/issues/2175)
发布于 2017-07-18 16:43:33
求解✔️
contentComponent: props => <DrawerContent {...props} />
发布于 2019-10-01 19:17:30
我用这个解决了:
contentComponent: props => <DrawerNavigatorItems {...this.props} />https://stackoverflow.com/questions/45167415
复制相似问题