Skip to content

Instantly share code, notes, and snippets.

@BrodaNoel
Created January 19, 2019 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrodaNoel/2baae3df3fd01e9ce462fcc0360f084e to your computer and use it in GitHub Desktop.
Save BrodaNoel/2baae3df3fd01e9ce462fcc0360f084e to your computer and use it in GitHub Desktop.
import React from 'react';
import { View, TouchableOpacity } from 'react-native';
import duix from 'duix';
class Login extends React.Component {
onLoginClick = () => {
// here you do something to login the user
// ...
// then redirect to the Home page
duix.set('currentPage', 'Home');
};
render() {
return (
<View style={[{ flex: 1 }]}>
<TouchableOpacity onPress={this.onLoginClick}>
<View>
<Text>Press here to simulate a LogIn</Text>
</View>
</TouchableOpacity>
</View>
);
}
}
export default Login;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment