-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor:
onSubmit
handler should have correct type (#637)
Because we're using `createElement` from an old version of AriaKit, TS isn't checking the type of our `onSubmit` handler. It's not currently broken, but it's not being checked either. This change ensures it's correct, and makes it more correct by satisfying the types and the linter. Notably, an async function should not be a handler directly; instead, a handler should kick off an async function and attach an error handler as required. This satisfies lint rules against leaving promises dangling (apparently) accidentally.
- Loading branch information
Showing
1 changed file
with
48 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters