Hello Friends,
Welcome To Infinitbility!
Many people want to disable or block the drawer on a specific drawer navigation screen and you are also one of those then follow the below example to save your hour.
React Navigation blocked drawer
when use drawerLockMode
you can’t access the drawer anymore
Note: you can’t use openDrawer() and closeDrawer() also
1example : {2 screen : ExampleScreen,3 navigationOptions: ({navigation}) => (4 {5 drawerLockMode: 'locked-closed'6 }7 )8},
React Navigation disable gesture
disable gesture only affect gestures only like swipe left and many more.
1example : {2 screen : ExampleScreen,3 navigationOptions: ({navigation}) => (4 {5 gestureEnabled: false6 }7 )8},
React Navigation swipe gesture
swipe gesture use only when you want to disable swipe gestures.
1example : {2 screen : ExampleScreen,3 navigationOptions: ({navigation}) => (4 {5 swipeEnabled: false6 }7 )8},
if you get help, please share a post on your social network
More From React Native Tutorial
Basics
- Introduction To React Native
- React Native Environment Setup using expo
- React Native Environment Setup for windows
- React Native Environment setup on Mac OS
- React Native Environment setup on linux
- React Native Project Structure
- React Native State
- React Native Props
- React Native Styling
- React Native Flexbox
- React Native Text
- React Native Textinput
Advances
- React Native Dark Mode
- React Native Fonts
- React Native SQLite
- React Native DatepickerAndroid
- React native ScrollView scroll to position
- How to align icon with text in react native
- React Native Image
- React Native Firebase Crashlytics
- React Native Async Storage
- React Native Share
Error & Issue Solution
- Task :app:transformDexArchiveWithDexMergerForDebug FAILED In React Native
- Expiring Daemon because JVM heap space is exhausted In React Native
- Task :app:transformNativeLibsWithMergeJniLibsForDebug FAILED In React Native
- Unable to determine the current character, it is not a string, number, array, or object in react native
- App crashed immediately after install react native video or track player
- how to delete SQLite database in android react native
- React native material dropdown twice click issue
- How to get the current route in react-navigation?
- how to disable drawer on the drawer navigation screen?
- Image not showing in ios 14 react native