【问题标题】:Check the render method of `Drawer Sidebar`检查 `Drawer Sidebar` 的渲染方法
【发布时间】:2017-07-18 12:54:04
【问题描述】:

我正在使用 React-navigation 模块,我创建了DrawerContent,但出现了这个错误:
Check the render method of "Drawer Sidebar"
如何修复此错误?

默认密码没问题:
contentComponent: props => <ScrollView><DrawerItems {...props} /></ScrollView>

我的新代码不正确:
contentComponent: DrawerContent

const DrawerContent = (props) => (<ScrollView><DrawerItems {...props} /></ScrollView>)

我也打开了这个问题:(https://github.com/react-community/react-navigation/issues/2175)

【问题讨论】:

    标签: react-native react-navigation


    【解决方案1】:

    已解决✔️
    contentComponent: props => <DrawerContent {...props} />

    【讨论】:

      【解决方案2】:

      我用这个解决了:

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

      【讨论】:

        猜你喜欢
        • 2019-02-04
        • 2018-02-13
        • 2021-07-12
        • 2019-01-17
        • 2019-08-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多