Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to persist page name and validate it every time app reopen using react native?

$
0
0

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})

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>