Closed ralph-p closed 10 months ago
https://github.com/react-hook-form/documentation/blob/981913bd1c41c478f54cf06d5c4eb854cb959d86/src/content/docs/useform.mdx#L464-L469
This causes a Error: Promise-returning function provided to attribute where a void return was expected. @typescript-eslint/no-misused-promises typescript error. This change fixes the issue for me
Error: Promise-returning function provided to attribute where a void return was expected. @typescript-eslint/no-misused-promises
const onSubmit = (data: IFormInput) => { console.log(data) }; return ( <form onSubmit={(event) => { event.preventDefault(); void handleSubmit(onSubmit)(event); }}>
https://github.com/react-hook-form/documentation/blob/981913bd1c41c478f54cf06d5c4eb854cb959d86/src/content/docs/useform.mdx#L464-L469
This causes a
Error: Promise-returning function provided to attribute where a void return was expected. @typescript-eslint/no-misused-promises
typescript error. This change fixes the issue for me