Just prevent the default behavior of the form:
<form onSubmit={event => { event.preventDefault(); form.handleSubmit(onSubmit)(event); }}>