You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/your-first-component.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ title: مكوّنك الأول
25
25
<h1>مكوّني الأول</h1>
26
26
<ol>
27
27
<li>المكوّنات: حجر بناء واجهة المستخدم</li>
28
-
<li>تعريف مكوّن</li>
29
-
<li>إستخدام مكوّن</li>
28
+
<li>تعريف المكوّن</li>
29
+
<li>إستخدام المكوّن</li>
30
30
</ol>
31
31
</article>
32
32
```
@@ -53,7 +53,7 @@ title: مكوّنك الأول
53
53
54
54
مع نمو مشروعك, ستلاحظ انه يمكن تجميع العديد من تصاميمك بواسطة إعادة استخدام مكوّنات كتبتها مسبقا, مما يسرع عملية التطوير. يمكن إضافة فهرس المحتويات أعلاه الى أي شاشة عن طريق `<TableOfContents />`! يمكنك أيضا الإنطلاق بسرعة في مشروعك باستخدام آلاف المكوّنات المشتركة من قبل مجتمع React مفتوحة المصدر مثل [Chakra UI](https://chakra-ui.com/) و [Material UI.](https://material-ui.com/).
55
55
56
-
## تعريف مكوّن {/*defining-a-component*/}
56
+
## تعريف المكوّن {/*defining-a-component*/}
57
57
58
58
تقليديًا، عند إنشاء صفحات الويب، يقوم مطورو الويب بترميز المحتوى الخاص بهم ومن ثم يضيفون التفاعل عن طريق إضافة بعض JavaScript. نجح هذا بشكل رائع عندما كان التفاعل مجرد ميزة اضافية جيدة على الويب. الآن يُتوقع وجود التفاعل في العديد من المواقع وجميع التطبيقات. تضع React التفاعلية في المقام الأول مع الاستمرار في استخدام نفس التقنية: **مكوّن React هو دالة JavaScript يمكنك أن تُضف إليها ترميز مرئي.** هنا مثال لذلك (يمكنك تحرير المثال أدناه):
59
59
@@ -118,9 +118,9 @@ return (
118
118
119
119
</Pitfall>
120
120
121
-
## Using a component {/*using-a-component*/}
121
+
## استخدام المكوّن {/*using-a-component*/}
122
122
123
-
Now that you've defined your `Profile` component, you can nest it inside other components. For example, you can export a`Gallery`component that uses multiple`Profile` components:
123
+
الآن بعد تعريفك لمكون `Profile`، يمكنك تضمينه داخل مكوّنات أخرى. على سبيل المثال، يمكنك تصدير مكون`Gallery`الذي يستخدم عدة مكونات`Profile`:
Components are regular JavaScript functions, so you can keep multiple components in the same file. This is convenient when components are relatively small or tightly related to each other. If this file gets crowded, you can always move `Profile` to a separate file. You will learn how to do this shortly on the [page about imports.](/learn/importing-and-exporting-components)
0 commit comments