react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

FormState generic type requires 1 type argument.

Open zalishchuk opened this issue 5 years ago • 3 comments

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",
}

zalishchuk avatar Jun 12 '19 20:06 zalishchuk

+1 ping

Miicky avatar Jun 25 '19 09:06 Miicky

any updates?

sntxerror avatar Jan 19 '21 21:01 sntxerror

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.

designbyadrian avatar May 04 '22 08:05 designbyadrian