0

I have not found solid info on such a question and have been using in React Apps:

submitForm(e) {
    e.preventDefault();
    /----------------
  }

My question was triggered by code reviewer, who accused my App https://giraffe.skepton.ru of refreshing page on edited form submit. Digging more info about Crome dev Tools gives me no answer. There are a few speculations about React and browser default behavior but what about React16... How can I detect page reload? Is preventDefault() enough to prevent brows default behavior in React16 based App?

Seemax
  • 121
  • 12

1 Answers1

2

Indeed e.preventDefault() is good enough.

In case there is already a thread about your question : React - Preventing Form Submission

Fabien Greard
  • 1,854
  • 1
  • 16
  • 26