I have this configuration of the routers in my app --
<Router navigationBarStyle={styles.navBar}
titleStyle={styles.navBarTitle}
>
<Scene key="modal" component={Modal}>
<Scene key="drawer" component={Drawer} open={false} type="replace" initial={this.state.flag ? false : true}>
<Scene key="mywishlist" component={MyWishlist} title="WISHLIST" type="replace" />
<Scene key="faq" component={FAQ} title="FAQ" type="replace" />
<Scene key="profilepic" component={ProfilePic} />
<Scene key="changepassword" component={ChangePassword} panHandlers={null} />
<Scene key="addressmanage" component={AddressManage} />
<Scene key="dishsearch" component={DishSearch} />
<Scene key="feedback" component={Feedback} hideNavBar type="replace" />
<Scene key="logout" component={Logout} hideNavBar type="replace" />
</Scene>
<Scene key="auth" initial={this.state.flag ? true : false} >
<Scene key="login" panHandlers={null} component={Login} title="Login" hideNavBar={true} type="replace" />
<Scene key="otp" panHandlers={null} component={OTP} title="OTP" hideNavBar={true} />
<Scene key="signup" panHandlers={null} component={SignUp} title="SignUp" hideNavBar={true} type="replace" />
<Scene key="coachmark" component={Coachmark} hideNavBar />
</Scene>
<Scene key="popUpImagePicker" panHandlers={null} component={PopUpImagePicker} title="PopUpImagePicker" hideNavBar={true} />
<Scene key="appModal" component={AppModal} />
</Scene>
</Router >
As soon as I come in logout I call Actions.auth()
in my componentWillMount()
to come to login screen but it is not working. Any suggestions on why not working and how can I route to login from any screen inside "drawer"?