Press back twice to exit? #9319
Answered
by
raajnadar
mmdevcodes
asked this question in
Q&A
-
Is there a recommended way to go about implementing a "press back twice to quit" type functionality? A toast would appear on the first press, and then exit the app if there are no screens left on the navigation stack. I assume it would be a combination of |
Beta Was this translation helpful? Give feedback.
Answered by
raajnadar
Feb 15, 2021
Replies: 1 comment
-
Try using |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
raajnadar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using
useState
+useEffect
+BackHandler