In myscenario, I am having three different screen like Page1
, Page2
, Page3
. Here, if user last visited page 2 then next time if user open application, instead of showing page1 need to show page2. How to achieve this using react native
application?
I tried by using async
storage but don’t know how to manage multiple page
AsyncStorage.getItem("alreadyLaunched").then(value => { if(value == null){ AsyncStorage.setItem('alreadyLaunched', true); // No need to wait for `setItem` to finish, although you might want to handle errors this.setState({firstLaunch: true}); } else{ this.setState({firstLaunch: false}); }}) // Add some error handling, also you can simply do this.setState({fistLaunch: value == null})