Promise-returning function provided to attribute where a void return was expected.
Hello, doing app with t3. I am using react-hook-form and I am getting error from handleSubmit:
Promise-returning function provided to attribute where a void return was expected.eslint@typescript-eslint/no-misused-promises
I tried by doing like this but those does not work correctly:
How this should be fixed?
9 Replies
(event) => void handleSubmit(event)
I think react hook form prevents it by default(?)
Idk what you’re on about now 😂 what I showed works for this ESLint plug-in problem
I mean I dont need the event, I am using react-hook-form
Of course you need to pass the event
Why would I? I have data correctly now but with the ts error https://react-hook-form.com/advanced-usage#CustomHookwithResolver
Then just don’t pass anything?
I am doing like documentation says, but t3 has this rule and not sure how to solve it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View