Skip to content

Commit 346f375

Browse files
authored
Update describing-the-ui.md
перевел часть статьи
1 parent 951189b commit 346f375

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/content/learn/describing-the-ui.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
2-
title: Describing the UI
2+
title: Описание UI
33
---
44

55
<Intro>
66

7-
React is a JavaScript library for rendering user interfaces (UI). UI is built from small units like buttons, text, and images. React lets you combine them into reusable, nestable *components.* From web sites to phone apps, everything on the screen can be broken down into components. In this chapter, you'll learn to create, customize, and conditionally display React components.
7+
React JavaScript библиотека, предназначенная для отрисовки пользовательских интерфейсов (UI). UI создается из таких маленьких блоков, как кнопка, текст и изображение. React позволяет вам объединить их в переиспользуемые и вкладываемые *компоненты*. Все, что находится на экране, от веб-сайтов до приложений для телефона, можно разделить на компоненты. В этой главе вы узнаете, как создавать, настраивать и условно отображать компоненты React.
88

99
</Intro>
1010

1111
<YouWillLearn isChapter={true}>
1212

13-
* [How to write your first React component](/learn/your-first-component)
14-
* [When and how to create multi-component files](/learn/importing-and-exporting-components)
15-
* [How to add markup to JavaScript with JSX](/learn/writing-markup-with-jsx)
16-
* [How to use curly braces with JSX to access JavaScript functionality from your components](/learn/javascript-in-jsx-with-curly-braces)
17-
* [How to configure components with props](/learn/passing-props-to-a-component)
18-
* [How to conditionally render components](/learn/conditional-rendering)
19-
* [How to render multiple components at a time](/learn/rendering-lists)
20-
* [How to avoid confusing bugs by keeping components pure](/learn/keeping-components-pure)
21-
* [Why understanding your UI as trees is useful](/learn/understanding-your-ui-as-a-tree)
13+
* [Как написать свой первый компонент React](/learn/your-first-component)
14+
* [Когда и как создавать файлы с несколькими компонентами](/learn/importing-and-exporting-components)
15+
* [Как добавить разметку в JavaScript с помощью JSX](/learn/writing-markup-with-jsx)
16+
* [Как использовать фигурные скобки в JSX для доступа к функциям JavaScript из ваших компонентов](/learn/javascript-in-jsx-with-curly-braces)
17+
* [Как настраивать компоненты при помощи пропсов](/learn/passing-props-to-a-component)
18+
* [Как условно отображать компоненты](/learn/conditional-rendering)
19+
* [Как одновременно отображать несколько компонентов](/learn/rendering-lists)
20+
* [Как избежать запутанных ошибок, сохранив чистоту компонентов](/learn/keeping-components-pure)
21+
* [Почему полезно представлять свой UI в виде деревьев](/learn/understanding-your-ui-as-a-tree)
2222

2323
</YouWillLearn>
2424

25-
## Your first component {/*your-first-component*/}
25+
## Ваш первый компонент {/*your-first-component*/}
2626

27-
React applications are built from isolated pieces of UI called *components*. A React component is a JavaScript function that you can sprinkle with markup. Components can be as small as a button, or as large as an entire page. Here is a `Gallery` component rendering three `Profile` components:
27+
Приложения, написанные при помощи React, состоят из изолированных блоков UI, называемых *компонентами*. React-компонент представляет из себя JavaScript функцию, в которую вы можете добавлять разметку. Компоненты могут быть маленькими, как кнопка, или большими, как целая страница. Ниже показан компонент `Gallery`, который отображает три компонента `Profile`:
2828

2929
<Sandpack>
3030

@@ -33,15 +33,15 @@ function Profile() {
3333
return (
3434
<img
3535
src="https://i.imgur.com/MK3eW3As.jpg"
36-
alt="Katherine Johnson"
36+
alt="Кэтрин Джонсон"
3737
/>
3838
);
3939
}
4040

4141
export default function Gallery() {
4242
return (
4343
<section>
44-
<h1>Amazing scientists</h1>
44+
<h1>Удивительные ученые</h1>
4545
<Profile />
4646
<Profile />
4747
<Profile />
@@ -58,11 +58,11 @@ img { margin: 0 10px 10px 0; height: 90px; }
5858

5959
<LearnMore path="/learn/your-first-component">
6060

61-
Read **[Your First Component](/learn/your-first-component)** to learn how to declare and use React components.
61+
Прочитайте статью **[Ваш первый компонент](/learn/your-first-component)**, чтобы узнать, как объявлять и использовать React-компоненты.
6262

6363
</LearnMore>
6464

65-
## Importing and exporting components {/*importing-and-exporting-components*/}
65+
## Импорт и экспорт компонентов {/*importing-and-exporting-components*/}
6666

6767
You can declare many components in one file, but large files can get difficult to navigate. To solve this, you can *export* a component into its own file, and then *import* that component from another file:
6868

@@ -117,7 +117,7 @@ Read **[Importing and Exporting Components](/learn/importing-and-exporting-compo
117117

118118
</LearnMore>
119119

120-
## Writing markup with JSX {/*writing-markup-with-jsx*/}
120+
## Пишем разметку при помощи JSX {/*writing-markup-with-jsx*/}
121121

122122
Each React component is a JavaScript function that may contain some markup that React renders into the browser. React components use a syntax extension called JSX to represent that markup. JSX looks a lot like HTML, but it is a bit stricter and can display dynamic information.
123123

@@ -186,7 +186,7 @@ Read **[Writing Markup with JSX](/learn/writing-markup-with-jsx)** to learn how
186186

187187
</LearnMore>
188188

189-
## JavaScript in JSX with curly braces {/*javascript-in-jsx-with-curly-braces*/}
189+
## Использование JavaScript внутри JSX при помощи фигурных скобок {/*javascript-in-jsx-with-curly-braces*/}
190190

191191
JSX lets you write HTML-like markup inside a JavaScript file, keeping rendering logic and content in the same place. Sometimes you will want to add a little JavaScript logic or reference a dynamic property inside that markup. In this situation, you can use curly braces in your JSX to "open a window" to JavaScript:
192192

@@ -234,7 +234,7 @@ Read **[JavaScript in JSX with Curly Braces](/learn/javascript-in-jsx-with-curly
234234
235235
</LearnMore>
236236
237-
## Passing props to a component {/*passing-props-to-a-component*/}
237+
## Передача пропсов в компонент {/*passing-props-to-a-component*/}
238238
239239
React components use *props* to communicate with each other. Every parent component can pass some information to its child components by giving them props. Props might remind you of HTML attributes, but you can pass any JavaScript value through them, including objects, arrays, functions, and even JSX!
240240
@@ -315,7 +315,7 @@ Read **[Passing Props to a Component](/learn/passing-props-to-a-component)** to
315315

316316
</LearnMore>
317317

318-
## Conditional rendering {/*conditional-rendering*/}
318+
## Условный рендеринг {/*conditional-rendering*/}
319319

320320
Your components will often need to display different things depending on different conditions. In React, you can conditionally render JSX using JavaScript syntax like `if` statements, `&&`, and `? :` operators.
321321

@@ -363,7 +363,7 @@ Read **[Conditional Rendering](/learn/conditional-rendering)** to learn the diff
363363
364364
</LearnMore>
365365
366-
## Rendering lists {/*rendering-lists*/}
366+
## Рендерим списки {/*rendering-lists*/}
367367
368368
You will often want to display multiple similar components from a collection of data. You can use JavaScript's `filter()` and `map()` with React to filter and transform your array of data into an array of components.
369369

@@ -463,7 +463,7 @@ Read **[Rendering Lists](/learn/rendering-lists)** to learn how to render a list
463463

464464
</LearnMore>
465465

466-
## Keeping components pure {/*keeping-components-pure*/}
466+
## Поддерживаем компоненты чистыми {/*keeping-components-pure*/}
467467

468468
Some JavaScript functions are *pure.* A pure function:
469469

@@ -524,7 +524,7 @@ Read **[Keeping Components Pure](/learn/keeping-components-pure)** to learn how
524524

525525
</LearnMore>
526526

527-
## Your UI as a tree {/*your-ui-as-a-tree*/}
527+
## Ваш UI как дерево {/*your-ui-as-a-tree*/}
528528

529529
React uses trees to model the relationships between components and modules.
530530

@@ -555,8 +555,8 @@ Read **[Your UI as a Tree](/learn/understanding-your-ui-as-a-tree)** to learn ho
555555
</LearnMore>
556556

557557

558-
## What's next? {/*whats-next*/}
558+
## Что дальше? {/*whats-next*/}
559559

560-
Head over to [Your First Component](/learn/your-first-component) to start reading this chapter page by page!
560+
Перейдите к статье [Ваш первый компонент](/learn/your-first-component), чтобы начать чтение этой главы статья за статьёй!
561561

562-
Or, if you're already familiar with these topics, why not read about [Adding Interactivity](/learn/adding-interactivity)?
562+
Или, если эти темы вам знакомы, почему бы не прочитать про [Добавление интерактивности](/learn/adding-interactivity)?

0 commit comments

Comments
 (0)