score:0

i think your default onsubmit action is called from react.js form.

add attribute type to button element inside element.

<form>
  <button onclick={this.submitform}>submit</button> {/* this will trigger twice, remove this. */}
  <button type="button" onclick={this.submitform}>submit</button> {/* add type="button" to prevent default action */}
</form>

Related Query

More Query from same tag