Hello!
I noticed that in the MainForm component, you are using FormProvider file. According to the official Controller documentation https://react-hook-form.com/docs/usecontroller/controller, the control object is obtained from useForm, but it is optional when using FormProvider.
Currently, the formHook (which contains control) is being explicitly passed to form fields, even though Controller can automatically retrieve control from FormProvider. This results in unnecessary prop drilling and additional complexity in the code.
Correct me if I'm wrong
Hello!
I noticed that in the MainForm component, you are using FormProvider file. According to the official Controller documentation https://react-hook-form.com/docs/usecontroller/controller, the control object is obtained from useForm, but it is optional when using FormProvider.
Currently, the formHook (which contains control) is being explicitly passed to form fields, even though Controller can automatically retrieve control from FormProvider. This results in unnecessary prop drilling and additional complexity in the code.
Correct me if I'm wrong