I have a onChange event attribute in an input box in a component,
<input
type="text"
required
className="form-control"
onChange={this.onChangeUsername}
/>
which is handled by this onChangeUsername() function
onChangeUsername(e) {
console.log(e.target.value);
this.setState({
username: e.target.value,
});
}
this function is called on every keystroke. Why is that?
