react-final-form
react-final-form copied to clipboard
FormState generic type requires 1 type argument.
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
My application has some code like this:
onChange?: (formState: FormState) => void;
So, after FormState
definition was updated to have FormValues
generic type for values
, I have this type of error: Generic type 'FormState<FormValues>' requires 1 type argument(s).
What is the expected behavior?
Make generic for FormState<FormValues>
optional and set default value to AnyObject
as it was before update.
export interface FormState<FormValues = AnyObject> {
What's your environment?
{
"react": "^16.8.6",
"react-dom": "^16.8.4",
"react-final-form": "^6.1.0",
"final-form": "^4.14.1",
}
+1 ping
any updates?
Please +1 the original post as it can be seen by moderators in their lists. +1:ing a comment won't do much in terms of exposure.