Skip to content

Instantly share code, notes, and snippets.

@oaugusto256
Created February 18, 2022 14:48
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 oaugusto256/3118ab6f1589da25787ac623431200c1 to your computer and use it in GitHub Desktop.
Save oaugusto256/3118ab6f1589da25787ac623431200c1 to your computer and use it in GitHub Desktop.
Example of TS Input event handler

Example of a Typescript function with ChangeEventHandler type:

const onChangeText: React.ChangeEventHandler<HTMLInputElement> = event => {
  setText(event.target.value);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment