diff --git a/README.md b/README.md index 3044c0d66..7120b83ef 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This repo contains the source code and documentation powering [reactjs.org](http ### Installation -1. `cd reactjs.org` to go into the project root +1. `cd ar.reactjs.org` to go into the project root 1. `yarn` to install the website's npm dependencies ### Running locally diff --git a/content/docs/forms.md b/content/docs/forms.md index 1a8b599d5..c005f2be3 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: +تعمل عناصر النماذج بشكلٍ مختلفٍ قليلًا عن بقيّة عناصر DOM الأخرى في React بسبب احتفاظ عناصر النماذج بشكل طبيعي بحالة داخلية خاصّة بها. فمثلًا يقبل هذا النموذج في 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". - -## Controlled Components {#controlled-components} +يمتلك هذا النموذج نفس السّلوك الافتراضي لنماذج HTML من حيث الانتقال إلى صفحة جديدة عندما يضغط المستخدم على زر تقديم البيانات (Submit)، وإن أردت فقط هذا السّلوك في React فسيعمل بشكل جيّد معك، ولكن في معظم الأحيان من الملائم أكثر أن نمتلك دالة في JavaScript تتعامل مع تقديم البيانات ولديها الوصول إلى البيانات التي أدخلها المستخدم في النموذج. الطريقة القياسيّة لتحقيق هذا الأمر هي باستخدام تقنيّة تدعى المُكوِّنات المضبوطة (controlled components). -In HTML, form elements such as ``, ` ``` -In React, a `