Home > Net >  how to create form using react js?
how to create form using react js?

Time:12-07

<form>
  <label>
    Name:
    <input type="text" name="name" />
  </label>
  <input type="submit" value="Submit" />
</form>

such as <input>, <textarea>, and <select> typically maintain their own state and update it based on user input. In React, mutable state is typically kept in the state property of components, and only updated with setState().

CodePudding user response:

If I got your point.
The thing you need is Uncontrolled Components.
Take a look at this document: Uncontrolled Components
It might help you

CodePudding user response:

you can still use document.getElementById if it helps in your case

  • Related