Skip to content

Instantly share code, notes, and snippets.

@koss-lebedev
Created October 23, 2022 07:17
Show Gist options
  • 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