aboutsummaryrefslogtreecommitdiff
path: root/App.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'App.tsx')
-rw-r--r--App.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/App.tsx b/App.tsx
index 70ff6a2d..dc5a9f77 100644
--- a/App.tsx
+++ b/App.tsx
@@ -38,6 +38,10 @@ declare const global: {HermesInternal: null | {}};
const App = () => {
const passwordInput = useRef();
+ const [data, setData] = React.useState({
+ username: '',
+ password: '',
+ })
return (
<>
@@ -65,6 +69,8 @@ const App = () => {
textContentType='username'
returnKeyType='next'
keyboardType='ascii-capable'
+ onChangeText={user => setData({...data, username: user})}
+ defaultValue={data.username}
onSubmitEditing={() => {passwordInput.current.focus()}}
blurOnSubmit={false}
/>
@@ -77,6 +83,8 @@ const App = () => {
autoCompleteType='password'
textContentType='password'
returnKeyType='go'
+ onChangeText={pass => setData({...data, password: pass})}
+ defaultValue={data.password}
onSubmitEditing={() => Alert.alert("My favorite Girl Scout Cookies are taggalongs!")}
ref={passwordInput}
secureTextEntry={true}