react-hook-form / documentation

📋 Official documentation
http://react-hook-form.com
MIT License
724 stars 1.04k forks source link

Fix handleSubmit type documentation. #1072

Closed GrybosKamil closed 4 months ago

GrybosKamil commented 4 months ago

Based on RHF types UseFormHandleSubmit: https://github.com/react-hook-form/react-hook-form/blob/master/src/types/form.ts#L626 SubmitErrorHandler: https://github.com/react-hook-form/react-hook-form/blob/master/src/types/form.ts#L81

handleSubmit method type should be descripted as follows:

handleSubmit: ( (data: Object, e?: Event) => Promise, (errors: Object, e?: Event) => Promise ) => Promise

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-hook-form-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 1:25pm