React导航抽屉v5x

时间:2020-02-21 18:24:34

标签: react-native

我尝试使用抽屉导航器的minSwipeDistance属性。但这给了我类似Inviolant object的错误。尝试了很多之后,我不知道该怎么办。有人可以帮助我吗?

         <NavigationContainer ref={navigationRef}>
                <Loader loading={this.state.loading} close={()=>{}} />
                <Drawer.Navigator
                    drawerStyle={{
                    width:Dimensions.get('window').width,
                }} drawerContent={ ()=>{return(<MenuDrawer cats={this.state.cat_list} />)}}>
                    screenOptions={{
                    minSwipeDistance:0.5
                }}
                    <Drawer.Screen
                        name="Main"
                        component={MainComponent}
                    />

                </Drawer.Navigator>
            </NavigationContainer>

0 个答案:

没有答案