Skip to content

Commit

Permalink
Reset form after submission
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeevrevan committed Aug 20, 2023
1 parent f88e52e commit 82d2c30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const App = () => {

const {
register,
reset,
formState: {
errors,
},
Expand All @@ -53,6 +54,7 @@ export const App = () => {

const onSubmit: SubmitHandler<FormValues> = data => {
alert(JSON.stringify(data))
reset()
}

//Проверка капчи
Expand Down

0 comments on commit 82d2c30

Please sign in to comment.