I'm trying to implement invisible reCaptcha
from react-google-recaptcha in type script project
I added the package's type by
yarn add @types/react-google-recaptcha
but when I want to implement the component, I get a type script error in here
<ReCAPTCHA
ref={recaptchaRef} // IN HERE
size="invisible"
sitekey="Your client site key"
/>
and this is the error's content
Type 'MutableRefObject<undefined>' is not assignable to type 'LegacyRef<ReCAPTCHA> | undefined'.'' Type 'MutableRefObject<undefined>' is not assignable to type 'RefObject<ReCAPTCHA>'. Types of property 'current' are incompatible.