From c9425fa34c137bb644e280b79335d286e65be7cf Mon Sep 17 00:00:00 2001 From: Minh Phan Date: Fri, 7 Jun 2019 01:00:00 +0700 Subject: [PATCH] Vietnamese Translation for Forms Page --- content/docs/forms.md | 75 ++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..22e1e0eb5 100644 --- a/content/docs/forms.md +++ b/content/docs/forms.md @@ -9,7 +9,7 @@ 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: +Trong React, HTML form element sẽ hoạt động hơi khác một chút so với các DOM element còn lại, form element sẽ giữ và tự xử lí một số state nội bộ (internal state) của riêng nó. Ví dụ như form dưới đây trong HTML sẽ nhận vào giá trị của input name. ```html
@@ -21,15 +21,15 @@ HTML form elements work a little bit differently from other DOM elements in Reac
``` -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". +Thẻ form này có các hành vi của một HTML form mặc đinh: đó là là khi user ấn vào nút sumit để gửi thông tin, nó vẫn sẽ browsing (chuyển trang) sang một trang mới. Và tất nhiên ở React thì form element vẫn sẽ xử lí hệt như thế. Nhưng ở những trường hợp thường gặp, sẽ tiện lợi hơn khi ta sử dụng một hàm (function) trong Javascript để xử lí quá trình gửi dữ liệu (submission) của form, function đó sẽ có thể truy cập vào dữ liệu (data) của form khi người dùng tương tác với form. Kĩ thuật vừa được đề cập ở trên là một quy chuẩn có tên "controlled components". ## Controlled Components {#controlled-components} -In HTML, form elements such as ``, ` ``` -In React, a `