This is my drawerNavigation :
const DashboardStack = StackNavigator({
Dashboard: {
screen: Dashb
Now, things have been changed in react-navigation version-5.
swipeEnabled is used to lock the drawer in Drawer.Screen inside the Drawer.Navigator
Visit https://reactnavigation.org/docs/drawer-navigator/#swipeenabled
Please see the below code:
import { createDrawerNavigator } from "@react-navigation/drawer";
import React from "react";
import { Sidebar } from "./SideBar";
import { ScreenWithDrawerEnabled } from "./ScreenWithDrawerEnabled";
import { ScreenWithDrawerDisabled } from "./ScreenWithDrawerDisabled";
const Drawer = createDrawerNavigator();
export const DashboardDrawerNavigator = () => (
}
>
{
return {
swipeEnabled: false,
};
}}
name={'ScreenWithDrawerDisabled'}
component={ScreenWithDrawerDisabled}
/>
);