How to get access to ref property of form elements (eg IonInput)


I’m trying to use React Hook Form and for that I need access to form elements ref property. I’m using typescript and it doesn’t recognize this property on IonInput and other Ion elements. Does anyone have a clue how I can get access to ref? Nothing in documentation. I tried itemRef but that also didn’t work. Can I just use normal Input? will it render properly on Android and IOS?

Just cheat…

        ref ={register({ required: true }) as any}
      {errors.username && <p>This field is required</p>}



Thanks man, appreciate it. using custom register works.