You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It gets pretty annoying when using the zodResolver, that I need to infer the zod-schema type AND pass it into the useForm hook to get the necessary type-completions.
It's more frustrating as zod is known for its great TS-first approach and type inference (see the usage in tRPC).
This particular gap in the types is noticeable when using the handleSubmit in rhf, and all the key-values are possibly undefined, even though the zod-schema wouldn't allow for it to pass its validation.
Describe the solution you'd like
Using the provided zod-schema in the zodResolver to infer the TFieldValues used in the useForm hook in rhf.
Describe alternatives you've considered
Generics seem the only feasible way of doing this.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It gets pretty annoying when using the
zodResolver
, that I need to infer the zod-schema type AND pass it into theuseForm
hook to get the necessary type-completions.It's more frustrating as
zod
is known for its great TS-first approach and type inference (see the usage in tRPC).This particular gap in the types is noticeable when using the
handleSubmit
inrhf
, and all the key-values are possibly undefined, even though the zod-schema wouldn't allow for it to pass its validation.Describe the solution you'd like
Using the provided zod-schema in the
zodResolver
to infer theTFieldValues
used in theuseForm
hook inrhf
.Describe alternatives you've considered
Generics seem the only feasible way of doing this.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: