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> redirect login home?
  • if router component nested within drawer 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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -