Ad

React Navigation V4: Swipe On Drawer Does Not Work In Android

- 1 answer

I have been searching for a solution for a long time but in React Navigation V4 there is no answer

I have created a simple Drawer Navigator with React Navigation V4. I have added a Menu icon, and when I click it, the drawer appears as it should be. But, no hand gesture is working. Swiping from left to right don't do anything. Even when the drawer is open, tapping on empty space doesn't close the drawer.

Here is my code:

import { createDrawerNavigator } from 'react-navigation-drawer'
import Gela from './gela';
import Japara from './japara';


const MyDrawerNavigator = createDrawerNavigator(
{
     Home: {
        screen: Gela,
     },
     Notifications: {
        screen: Japara,
     }
});


export default MyDrawerNavigator
Ad

Answer

It's probably because react-native-gesture-handler is not correctly installed.

Check the installation guide of react-navigation and be sure to install and configure all the dependencies

Ad
source: stackoverflow.com
Ad