useRef typescript code example
Example 1: useref input typescript
const input = React.useRef<HTMLInputElement>(null);
Example 2: useref react typescript
const inputRef = React.useRef<HTMLInputElement | null>(null);
Example 3: useref input typescript
const element = React.useRef<ElementType>(null);