Skip to content

Instantly share code, notes, and snippets.

@ralfting
Last active July 21, 2019 15:22
Show Gist options
  • Select an option

  • Save ralfting/795f99728042c7254bb0f053034ef094 to your computer and use it in GitHub Desktop.

Select an option

Save ralfting/795f99728042c7254bb0f053034ef094 to your computer and use it in GitHub Desktop.
import React, { useState } from 'react';
import { TextInput, Button } from 'react-native-paper';
import { Text, View } from 'react-native';
const LoginPage = () => {
const [login, setLogin] = useState('');
const [password, setPassword] = useState('');
const onSubmit = () => {
login(credentials);
}
return (
<View>
<Text>Login page</Text>
<TextInput
label='E-mail'
value={login}
onChangeText={setLogin}
/>
<TextInput
label='Senha'
password={password}
onChangeText={setPassword}
/>
<Button onPress={onSubmit}>Logar</Button>
</View>
);
};
export default LoginPage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment