From 03cb324bd9aab11b97bda874ea703b1b2b0e5ba0 Mon Sep 17 00:00:00 2001 From: Mohammad Raadi Date: Thu, 7 Mar 2019 18:01:30 +0330 Subject: [PATCH 01/13] initial persian translation - first draft --- content/docs/forms.md | 77 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..da771c57c 100644 --- a/content/docs/forms.md +++ b/content/docs/forms.md @@ -1,6 +1,6 @@ --- id: forms -title: Forms +title: کار با فرم ها permalink: docs/forms.html prev: lists-and-keys.html next: lifting-state-up.html @@ -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: +المان های فرم HTML در نحوه ی کارکرد با المان های دیگر DOM در ری‌اکت تفاوت جزیی دارند، به این دلیل که در حالت طبیعی این المان ها وضعیت ورودی خود را به صورت داخلی نگه داری می کنند. برای مثال، این کد فرم که به صورت HTML ساده نوشته شده است از کاربر یک نام دریافت می کند: ```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". +عملکرد این فرم به صورت رفتار پیش فرض فرم HTML می باشد که کاربر پس از ثبت فرم به صفحه ی جدید انتقال پیدا می کند. اگر این رفتار را در ری اکت می خواهید نیاز به انجام هیچ تغییری ندارید. اما در بسیاری از مواقع راه حل مناسب تر این است که یک تابع جاوا اسکریپت به مقادیر وارد شده توسط کاربر دسترسی داشته باشد و به عملیات ثبت فرم رسیدگی کند. روش استاندارد پیاده سازی این رفتار تکنیکی به نام "کامپوننت های کنترل شده" می باشد. -## Controlled Components {#controlled-components} +## کامپوننت های کنترل شده {#controlled-components} -In HTML, form elements such as ``, ` ``` -In React, a ` ``` -در ری اکت، تگ ` ``` -در ری‌اکت، تگ `