From 81e81a54b091f2aa97e57c661675d4fe262f027a Mon Sep 17 00:00:00 2001 From: Anton Serous Date: Thu, 21 Feb 2019 00:20:25 +1300 Subject: [PATCH 01/31] Translate "Forms" --- content/docs/forms.md | 123 +++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..fa9022a1e 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 ``, ` ``` -In React, a ` ``` -В React, ` ``` -В React `