开发者

how to create form using react js?

<form>
  <label>
    Name:
    <input type="text" name="name"开发者_如何学JAVA />
  </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().


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜