typescript type of useRef 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);
const input = React.useRef<HTMLInputElement>(null);
const inputRef = React.useRef<HTMLInputElement | null>(null);