Check the render method of `Drawer Sidebar`

泄露秘密 提交于 2019-12-08 13:04:25

问题


I'm using React-navigation module, and I Created DrawerContent and I Got this Error:
Check the render method of "Drawer Sidebar"
How Can I Fix this Error?

Default Code is ok:
contentComponent: props => <ScrollView><DrawerItems {...props} /></ScrollView>

My new Code is Not ok:
contentComponent: DrawerContent
and
const DrawerContent = (props) => (<ScrollView><DrawerItems {...props} /></ScrollView>)

I opened This Issue too: (https://github.com/react-community/react-navigation/issues/2175)


回答1:


Solved ✔️
contentComponent: props => <DrawerContent {...props} />




回答2:


I solved using this:

contentComponent: props => <DrawerNavigatorItems {...this.props} />


来源:https://stackoverflow.com/questions/45167415/check-the-render-method-of-drawer-sidebar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!