Skip to content

Instantly share code, notes, and snippets.

@rajatk16
Created July 11, 2018 11:48
Show Gist options
  • Save rajatk16/614cb83456f01488114da2c2b4ede6e4 to your computer and use it in GitHub Desktop.
Save rajatk16/614cb83456f01488114da2c2b4ede6e4 to your computer and use it in GitHub Desktop.
<script>
export default {
data: {
loaded: false
}
created() {
asyncStorage.getItem('email').then((val) => {
if (val) {
this.loaded = true
this.navigation.navigate('Home')
store.dispatch('SET_USER', {userObj: {email: val}})
} else {
this.loaded = true
}
})
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment