-
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
The app always exit when I press back in any view #2737
Comments
You need to handle to BackButton within your Router, just add this where you implemeted it :
...
If you want to do more about the transitions, please check #2628 |
Thank you, now it's working! But I still have the issue regarding the push of the views... the views aren't being pushed, looks like they are being replaced because there is no animation and when I go back after "push" 2 views, it's returning to the home and not to the previous one. |
If you want to do more about transitions, please have a look at #2628, it will help you with this! The other part with returning to home when pressing backButton is weird.. I see you already implemented the routerReducer, have a look at the logs : is there a list of routes similar as it should be with what you are doing in your navigation logic? |
The issue I have began when I change from react-native-drawer to use the Drawer of this package, as you can see my index.android.js contains only this My logs are showing that I'm pushing the views not replacing them. And in order to load the home of my app, I'm loading a very first Scene which is the splash
In that Component I'm reseting to
Probably I'm making a mistake there. What do you think? |
Are there any comments regarding my last question? |
I can't reproduce it with example project. |
Regarding the original issue, I just realised that is actually not working... I'm trying to back to a view but always replacing the views to the first one and it's never entering to the onBackPress, don't know why it's failing like that... I started a new project and it's the same. I remember with the v3 version everything was working perfectly, I know you cannot reproduce without an example but I'm not the only with that issue and you should to check creating a fresh project and it's actually not working as v3 did. |
Version
Tell us which versions you are using:
Expected behaviour
Don't exit the app and return to the previous view and push the views correctky
Actual behaviour
There is no actual animation when I'm opening a new view with push, and when I press back the app always exit at any point.
This is my index.android.js
render() { return ( <Router /> ); }
The text was updated successfully, but these errors were encountered: