how to prevent form submit refreshig page in react code example
Example: stop from from refresching page react
function handleSubmit(event) {
event.preventDefault();
}
...
<form onSubmit={handleSubmit}></form>
function handleSubmit(event) {
event.preventDefault();
}
...
<form onSubmit={handleSubmit}></form>