Problem Statement
Change handler for <input onChange={…}> is…
Explanation
React wraps DOM events. For text inputs, the handler receives ChangeEvent<HTMLInputElement>. You can read e.currentTarget.value safely.
Code Solution
SolutionRead Only
import { ChangeEvent } from 'react';
function NameField(){
const onChange = (e: ChangeEvent<HTMLInputElement>) => {
console.log(e.currentTarget.value);
};
return <input onChange={onChange} />;
}