final-form / final-form/react-final-form
Bug: Cannot use createForm() instance with <Form/> normally
Open
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
After creating a form with `createForm()`:
```ts
type FormValues = {
name: string;
};
const initialValues: FormValues = {
name: 'Foo',
};
const form = createForm({
initialValues: initialValues,
onSubmit: submitForm,
}),
```
I cannot use it in a normal way in: ``.
```ts
return (
)
Instead TypeScript starts complaining about wrong `onSubmit`:
```
TS2741: Property 'onSubmit' is missing in type '{ form: FormApi>; render: ({ handleSubmit, form, submitting, pristine, values }: FormRenderProps>) => Element; }' but required in type 'FormProps>'.
```
Contributor guide
Assessment
This issue has not been assessed yet.