Tell us which versions you are using:
On Press on Hardware Back button on First Scene it should close the app.
App does not close.
Here is my Router Component
const RouterComponent = () => {
return (
getSceneStyle={getSceneStyle}
navBarStyle={styles.navBarStyle}
>
component={Login}
title={I18n.t('title_login')}
onEnter={isLoggedIn}
/>
component={Login}
title={I18n.t('title_login')}
/>
component={Error}
/>
);
};
const isLoggedIn = () => {
const auth = AuthService.getAuthObject();
console.log(TAG, 'IsLoggedIn Check');
if (auth && auth.loggedIn) {
//Actions.home({ type: ActionConst.RESET });
}
};
Same problem here
Just pass prop backAndroidHandler to Router with own handler of back. Many users of RNRF didn't want to exit app for back button for some reason, so it works in such way.
Ah okay, that seems to fix it. I used to use onBackAndroid.
@aksonov
Help me please, as I understood, onBackAndroid works only on Android?
How to resolve this problem on IOS?
Do you have hardware IOS back button??
Oh, sorry)
I use only Android.
Most helpful comment
Do you have hardware IOS back button??