Q:

typescript react onchange event type

 onChange={(
                ev: React.ChangeEvent<HTMLInputElement>,
            ): void => setInputValue(ev.target.value)}
1
type Props = {
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void
}

export Input:React.FC<Props> ({onChange}) => (
  <input type="tex" onChange={onChange} />
)
0

New to Communities?

Join the community