title: React Native Remove Autofill Space with State set Input
body: <p>I'm running into the issue with my login screen where people autofill in their emails so it leaves a space at the end of the screen. I want to clear that when they move to add their password so was thinking of doing a <strong>onBlur</strong> that could probably use a .trim() or .replace() but how do I use that with my setEmail useState?</p>
  <p>Screen blow:</p>
  <pre><code>const LoginScreen = ({ navigation }) =&gt; {
  
      const [email, setEmail] = useState('');
      const [password, setPassword] = useState('');
      const [error, setError] = useState('');
  
      const LogInUser = async() =&gt; {
          if(email &amp;&amp; password) {
              try {
                  await auth.signInWithEmailAndPassword(email, password)
                  setEmail('')
                  setPassword('')
                  setError('')
                  navigation.replace('Home')
                  console.log('User Logged In = ');
              } catch (err){
                  setError('Email or Password is wrong!');
                  console.log(err);
              }
          }
      }
  
      return (
      &lt;DismissKeyboard&gt;     
          &lt;View style={styles.screenStyle}&gt;
          &lt;View style={{ ...StyleSheet.absoluteFill }}&gt;
                  &lt;Image source={require('../../assets/images/AccountBG.png')} style={{ flex: 1, height: null, width: null}} /&gt;
              &lt;/View&gt;               
              &lt;StatusBar hidden={true} /&gt;
              &lt;View style={styles.loginBox}&gt;
                  &lt;Text style={[styles.whiteText, styles.headTextH1, styles.headingBufferBottom]}&gt;Welcome&lt;/Text&gt;
                  &lt;Text style={styles.errorMessage}&gt;{error}&lt;/Text&gt;
                  &lt;TextInput
                      style={styles.inputStyles}
                      placeholder=&quot;Email&quot;
                      placeholderTextColor=&quot;#000&quot;
                      value={email}
                      onChangeText={setEmail}
                      onBlur={cleanEmail}
                  /&gt;
                  &lt;TextInput
                      style={styles.inputStyles}
                      secureTextEntry
                      placeholder=&quot;Password&quot;
                      placeholderTextColor=&quot;#000&quot;
                      value={password}
                      onChangeText={setPassword}
                  /&gt;
                  &lt;OGButton title=&quot;Login&quot; onPress={()=&gt; LogInUser()} /&gt;
              &lt;/View&gt;
              &lt;View style={[styles.registerBox, styles.whiteText]}&gt;
                  &lt;Text style={styles.whiteText}&gt;Don't have an account? | &lt;/Text&gt;
                  &lt;Text style={[styles.underlineText, styles.whiteText]} onPress={() =&gt; navigation.navigate('Register')} &gt;Register Here&lt;/Text&gt;
              &lt;/View&gt;
          &lt;/View&gt;
      &lt;/DismissKeyboard&gt;        
      );
  }
  </code></pre>