Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created October 23, 2022 07:17
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/4279eab61f1a71f488ce0cd548daa416 to your computer and use it in GitHub Desktop.
Save koss-lebedev/4279eab61f1a71f488ce0cd548daa416 to your computer and use it in GitHub Desktop.
type Props = InputHTMLAttributes<HTMLInputElement>
const Input = (props: Props) => { /* ... */ }
const CharCountInput = (props: Props) => {
return (
<div>
<Input {...props} />
<span>Char count: {props.value.length}</span>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment