Answer the question
In order to leave comments, you need to log in
One character input in onChange???
Good afternoon, tell me why the input goes one character at a time?
input:
<input type="text" name="loginUser" value={props.loginUser} onChange = {props.LoginUserName} placeholder="Логин"/>
LoginUserName = e => {
this.setState({
loginUser: e.target.value
});
}
this.state = {
loginUser: ""
}
Answer the question
In order to leave comments, you need to log in
It was probably necessary to show the entire component)
Why do you take value from props, and not from state? Or is it not just one component?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question