I render react final form:
<Form render={FormView} onSubmit={onSubmit} initialValues={state} clearForm={clearForm} />
and FormView located in another file, I use custom method clearForm and get it in FormView
function FormView(props: IProps) {
const { handleSubmit, clearForm } = props
And I get the error:
ERROR in src/Filter/index.tsx(34,15):
TS2322: Type '(props: IProps) => Element' is not assignable to type '(props: FormRenderProps<IValues>) => ReactNode'.
Types of parameters 'props' and 'props' are incompatible.
Property 'clearForm' is missing in type 'FormRenderProps<IValues>' but required in type 'IProps'.
Version: typescript 3.9.5
How to expand Form types?