Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Sure, I see, but the promise can be ran, resolved or rejected even without it being returned by the function, isn't it? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Since the form tag's onSubmit attribute is of type
FormEventHandler<HTMLFormElement> = (e: FormEvent<HTMLFormElement>) => void
, shouldn'thandleSubmit()
also return that type instead of(e: ...) =>Promise<void>
?Is there a reason why the return type is like this?
Fabio.
Beta Was this translation helpful? Give feedback.
All reactions