React Native Router Flux Redirect Scene on Login Example -
i'm looking example of using react native router flux redirect user new scene once authentication has been validated. assuming have defined router component so:
<router> <scene key="root"> <scene key="login" component={login} title="login" initial={true} hidenavbar="true" duration={1} /> <scene key="home" component={home} title="home" hidenavbar="true" duration={1} /> </scene> </router>
- what needs updated in
<router>
redirectlogin
home
? - if
router
component nested withindrawer
component, where/how update state specify user logged in?
you should use actions.home() in login component authentication completed. router component doesn't need change.
and second question, can't have global states(unless want complicate simple app). use one, have use redux or similar libraries.
Comments
Post a Comment