Skip to content
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

How do I override (or disable) hardware back press button for a given scene? #2237

Closed
oatcrunch opened this issue Aug 15, 2017 · 2 comments
Closed

Comments

@oatcrunch
Copy link

I want to override hardware back press button so that Actions.pop() will not be executed by default. In other words, I want to block user (or disable hardware back press) from tapping hardware back press button for a particular scene.

Is there a way to accomplish that? If yes, how can that be done?

@aksonov
Copy link
Owner

aksonov commented Aug 16, 2017

Try to use https://facebook.github.io/react-native/docs/backhandler.html and check navigationState (Actions.state) from there.

@aksonov aksonov closed this as completed Aug 16, 2017
@jonrh
Copy link

jonrh commented Oct 2, 2017

@oatcrunch Were you able to figure this out? I'm in a similar situation and looking into BackHandler now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants