I have two components similars, Component One get a username and, Component Two get a password, i load a Component One/Two with this.state but when component One is DidUnmount the Component Two have de value input of Component One ._.
View(target: String) {
if (target === "Username") {
return (
<>
<IonCardTitle className="LoginTitle">
Bienvenido, Ingresa tu nombre de usuario.
</IonCardTitle>
<IonItem className="">
<IonLabel position="floating" >Usuario</IonLabel>
<IonInput
name="UserName"
min="5"
onIonChange={(e) => this.InputUsername(e.target as HTMLInputElement)}
type="text"></IonInput>
</IonItem>
</>
);
}
if (target === "Password") {
return (
<>
<IonCardTitle className="LoginTitle">
Bienvenido, Ingresa tu contraseƱa.
</IonCardTitle>
<IonItem className="">
<IonLabel position="floating" >ContraseƱa</IonLabel>
<IonInput
name="Password"
onIonInput={e => this.InputPassword(e.target as HTMLInputElement)}
min="5"
type="password"></IonInput>
</IonItem>
</>
);
}
}