title: React with TypeScript: how to create ref prop
body: <p>I am using Ionic with React (typescript) and I am creating my custom form builder. There I created my form that has to have a ref property, because I need a reference of it when I use it.
  My problem is that I don't know how to define a prop that is reference type for my custom form builder.</p>
  <p>This is how I am using it:</p>
  <pre><code>const form = useRef&lt;HTMLFormElement&gt;(null);
  
  return (
    &lt;IonPage&gt;
      &lt;Header /&gt;
      &lt;IonContent fullscreen&gt;
        &lt;Form
          ref={form}
          submit={() =&gt; onSubmit()}
          fields={ fields }
          render={() =&gt; (
            &lt;React.Fragment&gt;
              &lt;IonCard&gt;
                &lt;IonCardHeader&gt;
                  &lt;IonLabel&gt;Valamilyen form&lt;/IonLabel&gt;
                &lt;/IonCardHeader&gt;
                &lt;IonCardContent&gt;
                  &lt;Field {...fields.name} /&gt;
                &lt;/IonCardContent&gt;
              &lt;/IonCard&gt;
            &lt;/React.Fragment&gt;
          )}/&gt;
      &lt;/IonContent&gt;
      &lt;Footer /&gt;
    &lt;/IonPage&gt;
  );
  </code></pre>
  <p>Here I got an error:
  <em>Property 'ref' does not exist on type 'IntrinsicAttributes &amp; IFormProps &amp; IFormState &amp; { children?: ReactNode; }'</em></p>
  <p>My Form React.FC looks like this:</p>
  <pre><code>type formProps = IFormProps &amp; IFormState;
      
  export const Form: React.FC&lt;formProps&gt; = React.forwardRef&lt;HTMLFormElement, formProps&gt;( (props: formProps, porpsRef) =&gt; {
    return (
      &lt;form onSubmit={handleSubmit} noValidate={true} ref={porpsRef} /&gt;
    );
  )};
  </code></pre>
  <p>I need to add to my Form component a property named ref of the reference, but I don't know how.</p>
  <p>Thanks</p>