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/describing-the-ui.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,30 @@
1
1
---
2
-
title: Describing the UI
2
+
title: Описание UI
3
3
---
4
4
5
5
<Intro>
6
6
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.
8
8
9
9
</Intro>
10
10
11
11
<YouWillLearnisChapter={true}>
12
12
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)
*[Как одновременно отображать несколько компонентов](/learn/rendering-lists)
20
+
*[Как избежать запутанных ошибок, сохранив чистоту компонентов](/learn/keeping-components-pure)
21
+
*[Почему полезно представлять свой UI в виде деревьев](/learn/understanding-your-ui-as-a-tree)
22
22
23
23
</YouWillLearn>
24
24
25
-
## Your first component {/*your-first-component*/}
25
+
## Ваш первый компонент {/*your-first-component*/}
26
26
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`:
Read **[Your First Component](/learn/your-first-component)** to learn how to declare and use React components.
61
+
Прочитайте статью **[Ваш первый компонент](/learn/your-first-component)**, чтобы узнать, как объявлять и использовать React-компоненты.
62
62
63
63
</LearnMore>
64
64
65
-
## Importing and exporting components {/*importing-and-exporting-components*/}
65
+
## Импорт и экспорт компонентов {/*importing-and-exporting-components*/}
66
66
67
67
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:
68
68
@@ -117,7 +117,7 @@ Read **[Importing and Exporting Components](/learn/importing-and-exporting-compo
117
117
118
118
</LearnMore>
119
119
120
-
## Writing markup with JSX {/*writing-markup-with-jsx*/}
120
+
## Пишем разметку при помощи JSX {/*writing-markup-with-jsx*/}
121
121
122
122
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.
123
123
@@ -186,7 +186,7 @@ Read **[Writing Markup with JSX](/learn/writing-markup-with-jsx)** to learn how
186
186
187
187
</LearnMore>
188
188
189
-
## JavaScript in JSX with curly braces {/*javascript-in-jsx-with-curly-braces*/}
189
+
## Использование JavaScript внутри JSX при помощи фигурных скобок {/*javascript-in-jsx-with-curly-braces*/}
190
190
191
191
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:
192
192
@@ -234,7 +234,7 @@ Read **[JavaScript in JSX with Curly Braces](/learn/javascript-in-jsx-with-curly
234
234
235
235
</LearnMore>
236
236
237
-
## Passing props to a component {/*passing-props-to-a-component*/}
237
+
## Передача пропсов в компонент {/*passing-props-to-a-component*/}
238
238
239
239
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!
240
240
@@ -315,7 +315,7 @@ Read **[Passing Props to a Component](/learn/passing-props-to-a-component)** to
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.
321
321
@@ -363,7 +363,7 @@ Read **[Conditional Rendering](/learn/conditional-rendering)** to learn the diff
363
363
364
364
</LearnMore>
365
365
366
-
## Rendering lists {/*rendering-lists*/}
366
+
## Рендерим списки {/*rendering-lists*/}
367
367
368
368
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.
369
369
@@ -463,7 +463,7 @@ Read **[Rendering Lists](/learn/rendering-lists)** to learn how to render a list
463
463
464
464
</LearnMore>
465
465
466
-
## Keeping components pure {/*keeping-components-pure*/}
0 commit comments