It will prompt the user a warning message to confirm the redirection after form submitting. This hangs
the redirection waiting for the user confirmation.
But the confirmation is implicit as soon as he clicks the submit button. Therefore there is no need to let the form in a modified state when submiting was successful.
Submiting did not make
this.state.modified
resetting tofalse
again.Issue
For example, when passing
Prompt
component (react-router-dom
) like soIt will prompt the user a warning message to confirm the redirection after form submitting. This hangs the redirection waiting for the user confirmation.
But the confirmation is implicit as soon as he clicks the submit button. Therefore there is no need to let the form in a modified state when submiting was successful.