diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..8a453cfa0 100644 --- a/content/docs/forms.md +++ b/content/docs/forms.md @@ -9,27 +9,27 @@ redirect_from: - "docs/forms-zh-CN.html" --- -HTML form elements work a little 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: +В React HTML-элементы формы ведут себя несколько отлично от остальных DOM-элементов, так как у элементов формы изначально есть внутреннее состояние. К примеру, в эту HTML-форму можно ввести имя: ```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". +По умолчанию браузер переходит на другую страницу при отправке HTML-форм, в том числе и этой. Если вас это устраивает, то не надо ничего менять, в React формы работают как обычно. Однако, чаще всего форму удобнее обрабатывать с помощью JavaScript функции, у которой есть доступ к введённым данным. Стандартный способ реализации такого поведения называется «контролируемые компоненты». -## Controlled Components {#controlled-components} +## Контролируемые компоненты {#controlled-components} -In HTML, form elements such as ``, `