` to your markup, you can write `<>` and
>
```
-This empty tag is called a *[Fragment.](/reference/react/Fragment)* Fragments let you group things without leaving any trace in the browser HTML tree.
+هذا العنصر الفارغ يسمى *[الأجزاء (Fragments)](/reference/react/Fragment)*. تسمح لك الأجزاء بتجميع الأشياء دون ترك أي أثر في شجرة HTML في المتصفح.
-#### Why do multiple JSX tags need to be wrapped? {/*why-do-multiple-jsx-tags-need-to-be-wrapped*/}
+#### لماذا يجب عليك تجميع عناصر JSX في عنصر واحد؟ {/*why-do-multiple-jsx-tags-need-to-be-wrapped*/}
-JSX looks like HTML, but under the hood it is transformed into plain JavaScript objects. You can't return two objects from a function without wrapping them into an array. This explains why you also can't return two JSX tags without wrapping them into another tag or a Fragment.
+يبدو JSX مثل HTML، لكنه في الحقيقة يتم تحويله إلى كائنات JavaScript عادية. لا يمكنك إرجاع كائنين من دون تجميعهما في مصفوفة. هذا يفسر لماذا لا يمكنك إرجاع علامتي JSX من دون تجميعهما في علامة أخرى أو في أجزاء.
-### 2. Close all the tags {/*2-close-all-the-tags*/}
+### 2. أغلق كل العلامات {/*2-close-all-the-tags*/}
-JSX requires tags to be explicitly closed: self-closing tags like `
![]()
` must become `
![]()
`, and wrapping tags like `
oranges` must be written as `oranges`.
+يتطلب JSX إغلاق العلامات بشكل صريح: العلامات المغلقة ذاتيًا مثل `
![]()
` يجب أن تصبح `
![]()
`، والعلامات الملفوفة مثل `
oranges` يجب أن تكتب كـ `oranges`.
-This is how Hedy Lamarr's image and list items look closed:
+هذا هو شكل صورة هايدي ليمار وعناصر القائمة المغلقة:
```js {2-6,8-10}
<>

+ />
- - Invent new traffic lights
- - Rehearse a movie scene
- - Improve the spectrum technology
+ - اختراع إشارات المرور
+ - إعادة تمثيل مشهد من فيلم
+ - تحسين بعض التكنولوجيا
>
```
-### 3. camelCase
all most of the things! {/*3-camelcase-salls-most-of-the-things*/}
+### 3. اكتب camelCase
لكل الأشياء لمعظم الأشياء! {/*3-camelcase-salls-most-of-the-things*/}
-JSX turns into JavaScript and attributes written in JSX become keys of JavaScript objects. In your own components, you will often want to read those attributes into variables. But JavaScript has limitations on variable names. For example, their names can't contain dashes or be reserved words like `class`.
+يتحول JSX إلى JavaScript والسمات المكتوبة في JSX تصبح مفاتيح لكائنات JavaScript. في مكوناتك الخاصة، ستريد في كثير من الأحيان قراءة تلك السمات في متغيرات. لكن JavaScript لديه قيود على أسماء المتغيرات. على سبيل المثال، لا يمكن أن تحتوي أسماءهم على شرطات أو تكون كلمات محجوزة مثل `class`.
-This is why, in React, many HTML and SVG attributes are written in camelCase. For example, instead of `stroke-width` you use `strokeWidth`. Since `class` is a reserved word, in React you write `className` instead, named after the [corresponding DOM property](https://developer.mozilla.org/en-US/docs/Web/API/Element/className):
+لهذا السبب، في React، تكتب العديد من السمات HTML و SVG بـ camelCase. على سبيل المثال، بدلاً من `stroke-width` تستخدم `strokeWidth`. نظرًا لأن `class` هي كلمة محجوزة، في React تكتب `className` بدلاً من ذلك، مسماة على [خاصية DOM البديلة](https://developer.mozilla.org/en-US/docs/Web/API/Element/className):
```js {4}

```
-You can [find all these attributes in the list of DOM component props.](/reference/react-dom/components/common) If you get one wrong, don't worry—React will print a message with a possible correction to the [browser console.](https://developer.mozilla.org/docs/Tools/Browser_Console)
+يمكنك [العثور على كل هذه السمات في قائمة خصائص مكونات DOM.](/reference/react-dom/components/common) إذا ارتكبت خطأً، لا تقلق — ستقوم React بطباعة رسالة مع تصحيح محتمل إلى [وحدة التحكم في المتصفح.](https://developer.mozilla.org/docs/Tools/Browser_Console)
-For historical reasons, [`aria-*`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) and [`data-*`](https://developer.mozilla.org/docs/Learn/HTML/Howto/Use_data_attributes) attributes are written as in HTML with dashes.
+لأسباب تاريخية، تكتب السمات [`aria-*`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA) و [`data-*`](https://developer.mozilla.org/docs/Learn/HTML/Howto/Use_data_attributes) كما هي في HTML مع شرطات.
-### Pro-tip: Use a JSX Converter {/*pro-tip-use-a-jsx-converter*/}
+### نصيحة احترافية: استخدم محول JSX {/*pro-tip-use-a-jsx-converter*/}
-Converting all these attributes in existing markup can be tedious! We recommend using a [converter](https://transform.tools/html-to-jsx) to translate your existing HTML and SVG to JSX. Converters are very useful in practice, but it's still worth understanding what is going on so that you can comfortably write JSX on your own.
+يمكن أن يكون تحويل كل هذه السمات في العلامات الموجودة مملًا! نوصي باستخدام [محوِّل](https://transform.tools/html-to-jsx) لترجمة HTML و SVG الموجودة إلى JSX. المحولات مفيدة جدًا في التدرّب، لكن من الأفضل فهم ما يجري حتى تتمكن من كتابة JSX بسهولة بمفردك.
-Here is your final result:
+هنا هو نتيجتك النهائية:
@@ -234,16 +232,16 @@ Here is your final result:
export default function TodoList() {
return (
<>
- Hedy Lamarr's Todos
+ مهمات هايدي
- - Invent new traffic lights
- - Rehearse a movie scene
- - Improve the spectrum technology
+ - اختراع إشارات المرور
+ - إعادة تمثيل مشهد من فيلم
+ - تحسين بعض التكنولوجيا
>
);
@@ -258,21 +256,20 @@ img { height: 90px }
-Now you know why JSX exists and how to use it in components:
+الأن تعرف لماذا JSX موجود وكيفية استخدامه في المكونات:
-* React components group rendering logic together with markup because they are related.
-* JSX is similar to HTML, with a few differences. You can use a [converter](https://transform.tools/html-to-jsx) if you need to.
-* Error messages will often point you in the right direction to fixing your markup.
+* تجمع مكونات React المنطق مع البناء معًا لأنهما مرتبطان.
+* JSX مشابه لـ HTML، مع بعض الاختلافات. يمكنك استخدام [محول](https://transform.tools/html-to-jsx) إذا كنت بحاجة إلى ذلك.
+* رسائل الخطأ غالبًا ما تشير إلى الاتجاه الصحيح لإصلاح البناء.
-
-#### Convert some HTML to JSX {/*convert-some-html-to-jsx*/}
+#### حوّل بعض HTML إلى JSX {/*convert-some-html-to-jsx*/}
-This HTML was pasted into a component, but it's not valid JSX. Fix it:
+تم لصق هذا الكود في مكون، لكنه ليس JSX صالح. قم بإصلاحه:
@@ -280,12 +277,12 @@ This HTML was pasted into a component, but it's not valid JSX. Fix it:
export default function Bio() {
return (
-
Welcome to my website!
+ مرحبًا بكم في موقعي!
- You can find my thoughts here.
+ يمكنك العثور على أفكاري هنا.
- And pictures of scientists!
+ و صور للعلماء!
);
}
@@ -308,7 +305,7 @@ export default function Bio() {
-Whether to do it by hand or using the converter is up to you!
+أيًّا ما تفعل، استخدام محّول أو بيدك، اختر المناسب لك.
@@ -319,12 +316,12 @@ export default function Bio() {
return (
-
Welcome to my website!
+ مرحبًا بكم في موقعي!
- You can find my thoughts here.
+ يمكنك العثور على أفكاري هنا.
- And pictures of scientists!
+ و صور للعلماء!
);
diff --git a/src/sidebarLearn.json b/src/sidebarLearn.json
index 89d5cffca..ec6f2c86a 100644
--- a/src/sidebarLearn.json
+++ b/src/sidebarLearn.json
@@ -60,7 +60,7 @@
"path": "/learn/importing-and-exporting-components"
},
{
- "title": "Writing Markup with JSX",
+ "title": "كتابة ترميز البناء بـ JSX",
"path": "/learn/writing-markup-with-jsx"
},
{