how to use react.useRef on typescript react element code example Example: useref react typescript const inputRef = React.useRef<HTMLInputElement | null>(null);