Answer the question
In order to leave comments, you need to log in
Why doesn't it throw an error with this typing?
hello there is this function
const onChangeHandler = (e:React.FormEvent<HTMLInputElement>) => {
console.log(e.currentTarget)
}
<div className="title" onChange={onChangeHandler}>
<h2>Добавить категорию</h2>
</div>
Answer the question
In order to leave comments, you need to log in
(e:React.FormEvent<HTMLInputElement>) означает на мой взгляд:
e:React.FormEvent <типа HTMLInputElement>
СобытиеFormEvent<От любого HTMLInputElement>
Подозреваю что div является HTMLInputElement -ом
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question