See the screenshot error plz
Clearly,
const inputRef = useRef<HTMLIonInputElement>();
is not enough.
See the screenshot error plz
const inputRef = useRef<HTMLIonInputElement>();
is not enough.
The ref should be cast as follows:
const inputRef = useRef() as RefObject<HTMLIonInputElement>;
Try updating your ref to:
const inputRef = useRef<HTMLIonInputElement>(null);
with the null as the default value, as elements can either be defined or null, but not undefined.
Far from intuitive, but thanks!