withForm-TypeError-fix
Type 'AppFieldExtendedReactFormApi<{ name: string; age: string; mobileNumber: string; note: string; address: { streetLine: string; }; }, FormValidateOrFn<{ name: string; age: string; mobileNumber: string; note: string; address: { streetLine: string; }; }> | undefined, ... 9 more ..., { ...; }>' is not assignable to type 'AppFieldExtendedReactFormApi<any, any, any, FormAsyncValidateOrFn<unknown> | undefined, any, FormAsyncValidateOrFn<unknown> | undefined, any, FormAsyncValidateOrFn<unknown> | undefined, FormAsyncValidateOrFn<...> | undefined, any, { ...; }, { ...; }>'. <AddressComponent form={form} /> is giving a TypeError. Is there any way to fix this error without explicitly using type any?
3 Replies
provincial-silver•5mo ago
Please put your code in backticks like this:

helpful-purpleOP•5mo ago
Okay I fixed it
ambitious-aqua•5mo ago
it means your
AddressComponent
and form={form}
are different forms.
* Do they share the same defaultValues?
* Do they share the same validators?