` اضافه به نشانهگذاری خود اضافه کنید، میتوانید بهجای آن `<>` و `>` بنویسید:
```js {1,11}
<>
@@ -169,21 +169,21 @@ If you don't want to add an extra `
` 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.
+این تگ خالی *[فرگمنت](/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 به نظر میرسد، اما در پسزمینه به آبجکتهای ساده جاوااسکریپت تبدیل میشود. نمیتوانید دو آبجکت را از یک تابع برگردانید مگر اینکه آنها را در یک آرایه بپیچید. این توضیح میدهد که چرا نمیتوانید دو تگ JSX را هم بدون پیچیدن در یک تگ دیگر یا یک فرگمنت برگردانید.
-### 2. Close all the tags {/*2-close-all-the-tags*/}
+### ۲. همه تگها را ببندید {/*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}
<>
@@ -200,11 +200,11 @@ This is how Hedy Lamarr's image and list items look closed:
>
```
-### 3. camelCase
all most of the things! {/*3-camelcase-salls-most-of-the-things*/}
+### ۳. 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 به جاوااسکریپت تبدیل میشود و صفتهای نوشتهشده در JSX به کلیدهای آبجکتهای جاوااسکریپت تبدیل میشوند. در کامپوننتهای خودتان، اغلب میخواهید آن صفتها را در متغیرها بخوانید. اما جاوااسکریپت روی نام متغیرها محدودیت دارد. برای مثال، نام آنها نمیتواند خط تیره داشته باشد یا کلمات رزرو شده مثل `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):
+به همین دلیل است که در ریاکت، بسیاری از صفتهای HTML و SVG بهصورت camelCase نوشته میشوند. برای مثال، بهجای `stroke-width` از `strokeWidth` استفاده میکنید. چون `class` یک کلمه رزرو شده است، در ریاکت بهجای آن `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) پیدا کنید. اگر یکی را اشتباه نوشتید، نگران نباشید — ریاکت پیامی با اصلاح احتمالی در [کنسول مرورگر](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:
+نتیجه نهایی شما اینجاست:
@@ -258,11 +258,11 @@ 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.
+* کامپوننتهای ریاکت منطق رندر را همراه با نشانهگذاری گروهبندی میکنند چون به هم مرتبطاند.
+* JSX شبیه HTML است، با چند تفاوت. اگر نیاز داشتید میتوانید از یک [مبدل](https://transform.tools/html-to-jsx) استفاده کنید.
+* پیامهای خطا اغلب شما را در مسیر درست برای رفع نشانهگذاریتان قرار میدهند.
@@ -270,9 +270,9 @@ Now you know why JSX exists and how to use it in components:
-#### 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:
+این HTML داخل یک کامپوننت پیست شده، اما JSX معتبری نیست. آن را رفع کنید:
@@ -308,7 +308,7 @@ export default function Bio() {
-Whether to do it by hand or using the converter is up to you!
+این کار را دستی انجام دهید یا با مبدل، با خودتان است!