Tell us which versions you are using:
render() {
return(
</Scene>
</Router>
);
}
I want it to go back to Login screen when an Item clicked from Drawer
logout(){
Actions.login({type: 'reset', data:obj});
}
2 questions:
I am using it for the first time any help really appreciated.
Thanks
If your app is guaranteed to pass the login screen, Actions.popTo('login') will work. Otherwise run the Actions.login without the type attribute, and set that as the type on the login <Scene /> in your router, which will reset the nav stack whenever the user ends up on the login screen.
@davidsharp worked perfect. This is probably the simplest solution the people over in https://github.com/aksonov/react-native-router-flux/issues/857 were looking for
Most helpful comment
If your app is guaranteed to pass the login screen,
Actions.popTo('login')will work. Otherwise run theActions.loginwithout thetypeattribute, and set that as the type on thelogin<Scene />in your router, which will reset the nav stack whenever the user ends up on the login screen.