Skip to content

Commit

Permalink
Merge pull request #36 from fkanout/trans-home-page-examples
Browse files Browse the repository at this point in the history
Translate home page examples
  • Loading branch information
asantarissy committed Mar 23, 2019
2 parents ba74ea7 + 47bba58 commit b78a836
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions content/home/examples/a-component-using-external-plugins.md
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>` بشكل آني.
10 changes: 6 additions & 4 deletions content/home/examples/a-simple-component.md
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.
5 changes: 2 additions & 3 deletions content/home/examples/a-stateful-component.md
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()`.
6 changes: 4 additions & 2 deletions content/home/examples/an-application.md
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` لمتابعة العناصر الموجودة في القائمة الحالية بالإضافة الى متابعة النص المُدخل من قبل المستخدم.
على الرغم من أن معالجات الأحداث تبدو وكأنها مُضمّنة ، إلا أنه سيتم جمعها وتنفيذها باستخدام تفويض الحدث.

0 comments on commit b78a836

Please sign in to comment.