Want to submit form in ReactJS using BUTTON element? The button element should work exactly as you expect providing the type is set to a submit button and the form has an onsubmit
handler.
1 2 3 | <form ref="form" onSubmit={this.handleSubmit}> <button type="submit">Do the thing</button> </form> |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.