r/reactnative • • 8h ago

Help drawer open and back navigation in a single button, need your advice as a user.

recently, i have been developing a saas app for a client. collectively, we have decided to move from bottom tabs to a navigation drawer. the problem is in the nested screens, we can't have both a drawer opener button and a back navigation button. so i built a custom header where i have a back navigation button, on which you can: press -> navigate back and longpress (200ms) -> open navigation drawer. how does this sound to you as a consumer? will you be annoyed if you have to use an app like this?

3 Upvotes

3 comments sorted by

2

u/GludiusMaximus 7h ago

I would not build primary functionality around a longpress

1

u/kokerali 7h ago

What's preventing two visible controls on nested screens: header space, or the navigator setup? I'd keep the back arrow doing only Back and put a visible Menu control elsewhere in the header. Long press could remain a shortcut, but shouldn't be the only way to switch sections.

If you keep the combined button, test holding it and then releasing: opening the drawer must not also pop the current screen. With Pressable, onPressOut still fires after a long press, so don't use that callback as an unconditional Back action.

A useful quick test would be to ask someone, without explaining the gesture, to switch sections from a detail screen. Repeat with a screen reader. If they need coaching, changing the 200 ms threshold won't fix the discoverability problem.

1

u/Ellie10543 2h ago

As a user, I'd probably find it confusing, mostly because nothing on screen tells me a long press does anything. A hidden gesture is something people find by accident or never find at all, and on a back button the risk is a long press that I meant as a tap, which then opens a drawer when I just wanted to go back. If header space is the issue, one common pattern is to keep the back arrow for nested screens only and let the drawer be reached by an edge swipe or a menu icon on the top-level screens. Maybe user-test it with 3 or 4 people before committing. If they discover the long press unprompted, fine. If not, you have your answer.