diff options
Diffstat (limited to 'App.tsx')
-rw-r--r-- | App.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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} |