我正在尝试使用 react 导航和 react-native-paper 的 Drawer 组件创建自定义导航抽屉,但是在升级包后我似乎遇到了错误。
错误:
"类型 '{children: Element; style: any; }' 缺少类型 'Pick
导致此错误的代码:
<DrawerContentScrollView {...props}>
<Drawer.Section> // this line causes the error
<Text>Hello world</Text>
</Drawer.Section>
</DrawerContentScrollView>
在升级之前,一切都按预期工作,我已经在多个不同的项目中使用过它。我尝试在网上搜索任何重大更改,但没有找到任何线索。
我该如何解决甚至规避这个问题?