Answer the question
In order to leave comments, you need to log in
What type is onchange(input)?
I use React + TypeScript.
This is how I wrote in the input:
<input value={this.val} onChange={this.handleInputChange} className="header-input" type="text" />
handleInputChange(event) {
this.val = event.target.value;
}
Answer the question
In order to leave comments, you need to log in
React.ChangeEvent<HTMLInputElement>
And there event.target.value
wo n't beevent.currentTarget.value
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question