Click in order · JavaScript and React course · Module 16: Error Handling and Suspense

handleSubmit Steps with try-catch

Click elements in order for the handleSubmit form steps:

Items to click

  • e.preventDefault()
  • finally { setIsSubmitting(false) }
  • Handle response or catch(error)
  • Send data to server (fetch)
  • Local field validation

You can check the correct answer by solving this task in the CodeWorlds game.