How do I stop a submission from refreshing a page?
Use the preventDefault() method on the event object to prevent a page refresh on form submit in React, e.g. event. preventDefault() . The preventDefault method prevents the browser from issuing the default action which in the case of a form submission is to refresh the page.One way to stop page resubmission on page refresh is to unset the form data …