-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App closes when pressing hardware back button #2323
Comments
Fixed it by overriding 'hardwareBackPress':
|
Where we have to override this. In code ? Any Dependencies need to be installed |
It's from react-native, not react-native-router-flux, check the doc : https://facebook.github.io/react-native/docs/backhandler.html And of course, this is only for Android. |
yeah. I am using android only. But I am using react-native router flux for navigation. my application gets closed if I press back button on Android. any Suggestions? |
If you read the doc carefully, you'll see this foe the Router component :
Use the |
okay thanks |
Version
"react-native-router-flux": "^4.0.0-beta.20",
"react-native": "0.44.0",
Expected behaviour
App doesn't close, but only goes back in navigation stack
Actual behaviour
App closes, but when I reopen it, it has gone back a step in navigation stack
Any help is welcome, thanks!
The text was updated successfully, but these errors were encountered: