React-final-form: FormState generic type requires 1 type argument.

Created on 12 Jun 2019  路  1Comment  路  Source: final-form/react-final-form

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

Most helpful comment

+1 ping

>All comments

+1 ping

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LucienBouletRoblin picture LucienBouletRoblin  路  3Comments

ThaNarie picture ThaNarie  路  3Comments

Noisycall picture Noisycall  路  4Comments

jkantr picture jkantr  路  4Comments

antoinerousseau picture antoinerousseau  路  3Comments