React JS - Form Handling

  • Create a Form.

  • Use onSubmit event to submit the form data and OnChange event when input box is triggered.

  • Define state(s).

  • Use preventDefault() method to avoid page reloading. 

  • Display form data on console.



















Github Link :

https://github.com/eramitsinha/React-Dummy/blob/main/src/Form.js

Comments