Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
11 replies
rocawear

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

<form onSubmit={handleSubmit(onSubmit)}>
....
</form>


I tried by doing like this but those does not work correctly:
void handleSubmit(onSubmit)

() => handleSubmit(onSubmit)


How this should be fixed?
Was this page helpful?