You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I log out the app.It should redirect to Login screen which is good and when I hit the back button on Android mobile.It should stay on login screen
Actual behavior
when I click on Logout button it's redirecting to the login screen which is good.if I click the back button on an android mobile.It's taking me to the logout screen.For handling this I used the backHandler.If i hit the back button from login screen on android mobile am closing the app.again click on the app it's redirecting to the LogOut screen.Here is my code.
How can I handle this functionality? and how to check before going to another scene is he loggedIn or not.Am not using the REDUX for my app.its, not a big app.
Could you please help me, guys.Am new to react-native
Steps to reproduce
Create an app by using react-native init someName
1.add three basic scenes(login,home,logout)
2.run in android mobile check the flow.
The text was updated successfully, but these errors were encountered:
I don't really understand your project. Help me please :
You have a home screen, where there is a logout button. You click on this button, so you go from the home screen to the login screen.
What is this logout screen?
What do you really want here? When you launch your app, you want to know if you should either go to the Login Screen (to log you in), or to the Home Screen if you're already logged in? Is that right ?
As of now, I solved the issue by using backhandler in react-native.Thanks for your reply.Just small clarification While navigating to the screens how can check if he is loggedIn or Not.
Version
Expected behavior
If I log out the app.It should redirect to Login screen which is good and when I hit the back button on Android mobile.It should stay on login screen
Actual behavior
when I click on Logout button it's redirecting to the login screen which is good.if I click the back button on an android mobile.It's taking me to the logout screen.For handling this I used the backHandler.If i hit the back button from login screen on android mobile am closing the app.again click on the app it's redirecting to the LogOut screen.Here is my code.
componentWillMount(){
BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick);
}
handleBackButtonClick(){
BackHandler.exitApp()
}
How can I handle this functionality? and how to check before going to another scene is he loggedIn or not.Am not using the REDUX for my app.its, not a big app.
Could you please help me, guys.Am new to react-native
Steps to reproduce
Create an app by using react-native init someName
1.add three basic scenes(login,home,logout)
2.run in android mobile check the flow.
The text was updated successfully, but these errors were encountered: