-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
No return type for useFormik
function
#2023
Comments
I have found |
+1. Currently, if you want to use the return type of
|
This makes wrapping
|
Found a work around for this export type Formik<T extends FormikValues> = ReturnType<typeof useFormik<T>>; |
馃悰 Bug report
Current Behavior
The return type for
useFormik
is defined inline.Expected behavior
There should be a separate type defined for the return value of
useFormik
Reproducible example
N/A
Suggested solution(s)
Add an explicit return type for
useformik
atformik/src/Formik.tsx
Line 135 in d90149e
Additional context
Trying to add formik step by step to an application. Want to specify the type of a component property that matches whatever
useFormik
returns. Currently I have to specify my ownFormConfig
type and add whatever I need there.Your environment
The text was updated successfully, but these errors were encountered: