resolvers icon indicating copy to clipboard operation
resolvers copied to clipboard

Infer form type from zod schema

Open maddijoyce opened this issue 3 years ago • 0 comments

Hi all,

I'm not sure if there's a specific reason this wasn't happening, but the react-hook-forms resolver type can overwrite the generic for TFieldValues. When you do this it allows typescript to infer the types in the form (for example in the submit handler), to match what the zod schema is producing.

I've included the change below :+1:

Thanks, Maddi

maddijoyce avatar Jun 21 '22 03:06 maddijoyce