首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检查“`Drawer”的渲染方法

检查“`Drawer”的渲染方法
EN

Stack Overflow用户
提问于 2017-07-18 12:54:04
回答 2查看 2.9K关注 0票数 1

我使用了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)

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-07-18 16:43:33

求解✔️

contentComponent: props => <DrawerContent {...props} />

票数 0
EN

Stack Overflow用户

发布于 2019-10-01 19:17:30

我用这个解决了:

代码语言:javascript
复制
contentComponent: props => <DrawerNavigatorItems {...this.props} />
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45167415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档