const textInputRef = useRef(); useEffect(() => { if (textInputRef && textInputRef.current) { textInputRef.current?.focus(); // property 'focus' does not exist on type 'never'