title: Ionic/React - How to get value from input item when it is auto-filled by the browser?
body: <p>I'm making an Ionic React app and am using Firebase to authenticate my user. One issue I'm facing is that on login/registration pages, if the user's username(email) or password is autofilled, that input item's onChange event doesn't get triggered, and the user's information won't get saved to my component's state. Is there a better way that I can accomplish this without being completely hacky? </p>
  
  <pre><code>const LoginPage: React.FC = () =&gt; {
    const [username, setUsername] = useState("");
    const [password, setPassword] = useState("");
  
    async function login() {
      const res = await loginUser(username, password);
      if(!res) {
        toast('There was an error logging in.') 
      }else {
        toast('You are logged in!');
      }
    }
  
  
  ...
  
              &lt;IonItem&gt;
                &lt;IonLabel position="stacked"&gt;
                  Email &lt;IonText color="danger"&gt;*&lt;/IonText&gt;
                &lt;/IonLabel&gt;
                &lt;IonInput
                  required
                  type="email"
                  onIonChange={(e: any) =&gt; setUsername(e.target.value)}
                &gt;&lt;/IonInput&gt;
              &lt;/IonItem&gt;
              &lt;IonItem&gt;
                &lt;IonLabel position="stacked"&gt;
                  Password &lt;IonText color="danger"&gt;*&lt;/IonText&gt;
                &lt;/IonLabel&gt;
                &lt;IonInput
                  required
                  type="password"
                  value={password}
                  onIonChange={(e: any) =&gt; setPassword(e.target.value)}
                &gt;&lt;/IonInput&gt;
              &lt;/IonItem&gt;
            &lt;/IonList&gt;
            &lt;div className="ion-padding"&gt;
              &lt;IonButton
                expand="block"
                onClick={login}
                class="ion-no-margin"
              &gt;
                Login
              &lt;/IonButton&gt;
            &lt;/div&gt;
        &lt;/IonContent&gt;
      &lt;/IonPage&gt;
  </code></pre>