Skip to content

Commit a0bf8eb

Browse files
committed
translate from line 216 to 264 (your first component page)
1 parent 6eb6f3a commit a0bf8eb

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/content/learn/your-first-component.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,38 +209,38 @@ function Profile() {
209209

210210
<DeepDive>
211211

212-
#### Components all the way down {/*components-all-the-way-down*/}
212+
#### استفاده از کامپوننت ها {/*components-all-the-way-down*/}
213213

214214
اپلیکیشن ریکتی شما از کامپوننت `root` شروع میشود. معمولا زمانی که یک پروژه جدید میسازید این کامپوننت ساخته میشود, مثلا اگر شما از [CodeSandbox](https://codesandbox.io/) یا [Create React App](https://create-react-app.dev/) استفاده میکنید, به طور پیش فرض داخل `src/App.js` تعریف شده. اگر از فریمورک [Next.js](https://nextjs.org/) استفاده میکنید, کامپوننت `root` داخل `pages/index.js` تعریف شده است.
215215

216-
Most React apps use components all the way down. This means that you won't only use components for reusable pieces like buttons, but also for larger pieces like sidebars, lists, and ultimately, complete pages! Components are a handy way to organize UI code and markup, even if some of them are only used once.
216+
اکثر برنامه های ریکتی از کامپوننت استفاده میکنند. به این معنی است که نه تنها از کامپوننت ها برای بخش های کوچکی مانند دکمه استفاده میکنیم, بلکه برای بخش های بزرگتری مانند منو ها یا لیست ها استفاده میکنیم. درکل از کامپوننت ها برای سازماندهی صفحات استفاده میکنیم.
217217

218-
[React-based frameworks](/learn/start-a-new-react-project) take this a step further. Instead of using an empty HTML file and letting React "take over" managing the page with JavaScript, they *also* generate the HTML automatically from your React components. This allows your app to show some content before the JavaScript code loads.
218+
[React-based frameworks](/learn/start-a-new-react-project) کار مارا جلوتر میاندازد. بجای اینکه فایل های HTML برای صفحات سایت تعریف کنیم, با استفاده از فایل های جاوااسکریپتی صفحات را توسعه میدهیم و آنهارا مدیریت میکنیم.
219219

220-
Still, many websites only use React to [add interactivity to existing HTML pages.](/learn/add-react-to-an-existing-project#using-react-for-a-part-of-your-existing-page) They have many root components instead of a single one for the entire page. You can use as much—or as little—React as you need.
220+
همچنان بسیاری از وبسایت ها از React برای [اضافه کردن تعامل در صفحه فعلی.](/learn/add-react-to-an-existing-project#using-react-for-a-part-of-your-existing-page) استفاده میشود. انها بجای یک کامپوننت ریشه از کامپوننت بیشتر و ریزتری استفاده کردند. شما میتوانید هرچقدر که نیاز دارید از کتابخانه ریکت استفاده کنید.
221221

222222
</DeepDive>
223223

224224
<Recap>
225225

226-
You've just gotten your first taste of React! Let's recap some key points.
226+
شما اکنون برای اولین بار طعم React را چشیده اید! اجازه بدهید یکسری موارد را درباره آن مرور کنیم:
227227

228-
* React lets you create components, **reusable UI elements for your app.**
229-
* In a React app, every piece of UI is a component.
230-
* React components are regular JavaScript functions except:
228+
* ریکت به شما اجازه میدهد کامپوننت های خود را, **که اجزایی هستند که میتوان چندین بار داخل اپلیکیشن استفاده کرد .** را توسعه دهید.
229+
* در یک اپلیکیشن ریکتی, هر جایی از صفحه (دراینجا رابط کاربری) یک کامپوننت است.
230+
* کامپوننت های ریکتی درواقع توابع معمولی جاوااسکریپتی هستند. البته باید :
231231

232-
1. Their names always begin with a capital letter.
233-
2. They return JSX markup.
232+
1. اسم آنها با حروف بزرگ شروع شود.
233+
2. کد JSX برگردانند.
234234

235235
</Recap>
236236

237237

238238

239239
<Challenges>
240240

241-
#### Export the component {/*export-the-component*/}
241+
#### خروجی گرفتن (export) از کامپوننت {/*export-the-component*/}
242242

243-
This sandbox doesn't work because the root component is not exported:
243+
کد زیر قاعدتا کار نخواهد کرد. چون کامپوننت اصلی (root) را اکسپورت نکرده ایم:
244244

245245
<Sandpack>
246246

@@ -261,7 +261,7 @@ img { height: 181px; }
261261

262262
</Sandpack>
263263

264-
Try to fix it yourself before looking at the solution!
264+
برای رفع این مشکل, به راه حل زیر دقت کنید!
265265

266266
<Solution>
267267

0 commit comments

Comments
 (0)