useref typescript custom component code example Example: useref react typescript const inputRef = React.useRef<HTMLInputElement | null>(null);