反应原生纸 Drawer.Section 不按预期工作

时间:2021-01-18 11:29:11

标签: react-native react-navigation react-native-paper

我正在尝试使用 react 导航和 react-native-paper 的 Drawer 组件创建自定义导航抽屉,但是在升级包后我似乎遇到了错误。

错误:

"类型 '{children: Element; style: any; }' 缺少类型 'Pick':accessibilityComponentType,accessibilityTraits"

导致此错误的代码:

<DrawerContentScrollView {...props}>
  <Drawer.Section> // this line causes the error
    <Text>Hello world</Text>
  </Drawer.Section>
</DrawerContentScrollView>

在升级之前,一切都按预期工作,我已经在多个不同的项目中使用过它。我尝试在网上搜索任何重大更改,但没有找到任何线索。

我该如何解决甚至规避这个问题?

0 个答案:

没有答案