user1235003
user1235003

Reputation: 111

react-navigation 3 drawer behavior issues

The drawer in react-navigation 3 (createDrawerNavigator) doesn't behave as expected.

  1. I added an icon that toggles the drawer. Clicking on it multiple times you expect the drawer to open/close smoothly, while what happens is that the drawer will fully open, then pause for another second and only then another click will close it.

  2. When open, let's say of 2/3 of the screen, you expect that clicking on the last 1/3 screen which doesn't include the drawer to close it - it doesn't.

Are these bugs or am I using it wrong?

Upvotes: 2

Views: 851

Answers (1)

Freddy
Freddy

Reputation: 472

What does your code look like?

That's what I use to open the drawer, it works like a charm.

onPress={() => navigation.dispatch(DrawerActions.openDrawer())}

Make sure you have react-native-gesture-handler linked. (manual!): React Navigation: Swipe on drawer does not work in Android

Upvotes: 1

Related Questions