Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created October 23, 2022 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koss-lebedev/38afa26ddc83c1940ff9f041de428a08 to your computer and use it in GitHub Desktop.
Save koss-lebedev/38afa26ddc83c1940ff9f041de428a08 to your computer and use it in GitHub Desktop.
type Props = HTMLAttributes<HTMLInputElement>
const CustomInput = ({ onChange, ...props }: Props) => {
const handleChange = (event) => {
/// ... some logic
onChange(event)
}
return <input {...props} onChange={handleChange} />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment