I'm new with Formik and typescript as well. I have a Button within my form and check if it valid by !formRef.current?.isValid
The problem is i use typescript and to avoid typescript error i need to type my useRef
The question is what the type of useRef must be instead of any?
What is the logic how to define in advance what type useRef must be? From what it depends on?
Thank you
const formRef = useRef<any>();
<Button
type="submit"
disabled={ !formRef.current?.isValid }
/>