-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from fkanout/trans-home-page-examples
Translate home page examples
- Loading branch information
Showing
4 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
title: A Component Using External Plugins | ||
title: مكوّن يستخدم مكتبة خارجية | ||
order: 3 | ||
domid: markdown-example | ||
--- | ||
|
||
React allows you to interface with other libraries and frameworks. This example uses **remarkable**, an external Markdown library, to convert the `<textarea>`'s value in real time. | ||
يسمح React باستخدام مكتبات (Libraries) خارجية بالإضافة الى Frameworks. | ||
هذا المثال يستخدم المكتبة **remarkable** كمكتبة خارجية لمعالجة تعابير من نوع Markdown، لتحويل قيمة `<textarea>` بشكل آني. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
--- | ||
title: A Simple Component | ||
title: مكّون بسيط | ||
order: 0 | ||
domid: hello-example | ||
--- | ||
كل مكوّن React مزوّد بالدّالة `Render()` التي تأخذ البيانات المدخلة و تُرجع ما يجب اظهاره. | ||
هذا المثال يستخدم تعابير تشبه XML أي (XML-Like) و التي تسمى JSX. | ||
البيانات المرسلة خلال المكّون يمكن الوصول اليها ضمن الدالة `Render()` بواسطة `this.props`. | ||
|
||
React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`. | ||
|
||
**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step. | ||
**استخدام JSX اختياري، وليس مطلوباً او شرطاً لاستخدام React.** جرّب [Babel REPL](babel://es5-syntax-example) | ||
لترى شيفرة الـ JavaScript الخام الموّلدة من خلال خطوة التحويل البرمجي لـ JSX. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
title: A Stateful Component | ||
title: مكوّن الحالة (Stateful) | ||
order: 1 | ||
domid: timer-example | ||
--- | ||
|
||
In addition to taking input data (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered markup will be updated by re-invoking `render()`. | ||
بالإضافة الى أخذ بيانات الادخال (التي يمكن الوصول اليها من خلال `this.props`)، يستطيع المكوّن ان يحتفظ بحالة بياناته الداخلية (التي يمكن الوصول اليها من خلال `this.state`) . عندما تتغير حالة بيانات المكوّن، العلامات المرسومة أو المُظهرة سيتم تحديثها و إعادة رسمها من خلال إعادة تنفيذ الدّالة `render()`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
--- | ||
title: An Application | ||
title: تطبيق | ||
order: 2 | ||
domid: todos-example | ||
--- | ||
|
||
Using `props` and `state`, we can put together a small Todo application. This example uses `state` to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation. | ||
باستخدام `props` و `state`، نستطيع ان ننشأ برنامج صغير يعرض قائمة المهام التي يجب القيام بها (Todo list). هذا المثال يستخدم `state` لمتابعة العناصر الموجودة في القائمة الحالية بالإضافة الى متابعة النص المُدخل من قبل المستخدم. | ||
على الرغم من أن معالجات الأحداث تبدو وكأنها مُضمّنة ، إلا أنه سيتم جمعها وتنفيذها باستخدام تفويض الحدث. | ||
|