Created
January 19, 2019 01:49
-
-
Save BrodaNoel/0b82bbcd2a442fa2692c6a7c7b7cbb34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { View, TouchableOpacity } from 'react-native'; | |
import duix from 'duix'; | |
class Home extends React.Component { | |
onLogOutClick = () => { | |
// here you do something to logout the user | |
// ... | |
// then redirect to the Login page again | |
duix.set('currentPage', 'Login'); | |
}; | |
render() { | |
return ( | |
<View style={[{ flex: 1 }]}> | |
<TouchableOpacity onPress={this.onLogOutClick}> | |
<View> | |
<Text>Log Out</Text> | |
</View> | |
</TouchableOpacity> | |
</View> | |
); | |
} | |
} | |
export default Home; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment