--- id: forms title: Forms permalink: docs/forms.html prev: lists-and-keys.html next: lifting-state-up.html redirect_from: - "tips/controlled-input-null-value.html" - "docs/forms-zh-CN.html" --- HTML form elements work a bit differently from other DOM elements in React, because form elements naturally keep some internal state. For example, this form in plain HTML accepts a single name: ```html
``` This form has the default HTML form behavior of browsing to a new page when the user submits the form. If you want this behavior in React, it just works. But in most cases, it's convenient to have a JavaScript function that handles the submission of the form and has access to the data that the user entered into the form. The standard way to achieve this is with a technique called "controlled components". ## Controlled Components {#controlled-components} In HTML, form elements such as ``, ` ``` In React, a `