Learning React and I know this question isn't part of it but I've always wondered what the preventDefault part does:
handleSubmit(event) {
alert('A name was submitted: ' + this.state.value);
event.preventDefault();
}
When I opened the example in a page and removed the preventDefault, the page just doesn't refresh when I hit submit. So does that mean the default behavior of a submit button on click is to make a send the form data somewhere and then redirect the current page to somewhere else? By having preventDefault, this prevents it from happening? Is this event a Dom event?