Skip to content

Commit 1e0e9e6

Browse files
authored
Merge pull request #19 from reactjs/home
Перевод главной страницы
2 parents 6b043f1 + d78a703 commit 1e0e9e6

11 files changed

+28
-28
lines changed

content/home/examples/a-component-using-external-plugins.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class MarkdownEditor extends React.Component {
22
constructor(props) {
33
super(props);
44
this.handleChange = this.handleChange.bind(this);
5-
this.state = { value: 'Hello, **world**!' };
5+
this.state = { value: 'Привет, **мир**!' };
66
}
77

88
handleChange(e) {
@@ -17,16 +17,16 @@ class MarkdownEditor extends React.Component {
1717
render() {
1818
return (
1919
<div className="MarkdownEditor">
20-
<h3>Input</h3>
20+
<h3>Редактор</h3>
2121
<label htmlFor="markdown-content">
22-
Enter some markdown
22+
Введите что-нибудь в формате Markdown
2323
</label>
2424
<textarea
2525
id="markdown-content"
2626
onChange={this.handleChange}
2727
defaultValue={this.state.value}
2828
/>
29-
<h3>Output</h3>
29+
<h3>Вывод</h3>
3030
<div
3131
className="content"
3232
dangerouslySetInnerHTML={this.getRawMarkup()}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: A Component Using External Plugins
2+
title: Компонент с использованием внешних плагинов
33
order: 3
44
domid: markdown-example
55
---
66

7-
React is flexible and provides hooks that allow you to interface with other libraries and frameworks. This example uses **remarkable**, an external Markdown library, to convert the `<textarea>`'s value in real time.
7+
React — гибкий, поэтому в нём есть хуки, которые дают работать с другими библиотеками и фреймворками. В этом примере используется внешняя библиотека **remarkable**, чтобы в режиме реального времени преобразовать Markdown-синтаксис, введённый в элемент `<textarea>`.

content/home/examples/a-simple-component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ class HelloMessage extends React.Component {
22
render() {
33
return (
44
<div>
5-
Hello {this.props.name}
5+
Привет, {this.props.name}
66
</div>
77
);
88
}
99
}
1010

1111
ReactDOM.render(
12-
<HelloMessage name="Taylor" />,
12+
<HelloMessage name="Саша" />,
1313
document.getElementById('hello-example')
1414
);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: A Simple Component
2+
title: Простой компонент
33
order: 0
44
domid: hello-example
55
---
66

7-
React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`.
7+
React-компоненты реализуют метод `render()`, который принимает входные данные и возвращает что-то для вывода. В этом примере используется XML-подобный синтаксис под названием JSX. Входные данные, передаваемые в компонент, доступны в `render()` через `this.props`.
88

9-
**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step.
9+
**JSX является необязательным и не требуется React.** Попробуйте [Babel REPL](babel://es5-syntax-example), чтобы увидеть JavaScript-код, полученный на этапе компиляции JSX.

content/home/examples/a-stateful-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Timer extends React.Component {
2121
render() {
2222
return (
2323
<div>
24-
Seconds: {this.state.seconds}
24+
Секунды: {this.state.seconds}
2525
</div>
2626
);
2727
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: A Stateful Component
2+
title: Компонент с состоянием
33
order: 1
44
domid: timer-example
55
---
66

7-
In addition to taking input data (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered markup will be updated by re-invoking `render()`.
7+
Помимо ввода входных данных (доступных через `this.props`), компонент поддерживает внутренние данные состояния (доступные через `this.state`). Когда данные состояния компонента изменятся, React ещё раз вызовет `render()` и обновит отрендеренную разметку.

content/home/examples/an-application.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ class TodoApp extends React.Component {
99
render() {
1010
return (
1111
<div>
12-
<h3>TODO</h3>
12+
<h3>Список дел</h3>
1313
<TodoList items={this.state.items} />
1414
<form onSubmit={this.handleSubmit}>
1515
<label htmlFor="new-todo">
16-
What needs to be done?
16+
Что нужно сделать?
1717
</label>
1818
<input
1919
id="new-todo"
2020
onChange={this.handleChange}
2121
value={this.state.text}
2222
/>
2323
<button>
24-
Add #{this.state.items.length + 1}
24+
Добавить #{this.state.items.length + 1}
2525
</button>
2626
</form>
2727
</div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: An Application
2+
title: Приложение
33
order: 2
44
domid: todos-example
55
---
66

7-
Using `props` and `state`, we can put together a small Todo application. This example uses `state` to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation.
7+
Используя `props` и `state`, можно создать небольшое приложение списка дел. В этом примере используется `state` для отслеживания текущего списка элементов, а также текста, введённого пользователем. Хотя обработчики событий встроены в разметку, они собираются и реализуются с помощью делегирования событий.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Component-Based
2+
title: Основан на компонентах
33
order: 1
44
---
55

6-
Build encapsulated components that manage their own state, then compose them to make complex UIs.
6+
Создавайте инкапсулированные компоненты с собственным состоянием, а затем объединяйте их в сложные пользовательские интерфейсы.
77

8-
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
8+
Поскольку логика компонента написана на JavaScript, а не содержится в шаблонах, можно с лёгкостью передавать самые разные данные по всему приложению и держать состояние вне DOM.

content/home/marketing/declarative.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Declarative
2+
title: Декларативный
33
order: 0
44
---
55

6-
React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
6+
Создавать интерактивные пользовательские интерфейсы на React — приятно и просто. Вам достаточно описать, как части интерфейса приложения выглядят в разных состояниях. React будет своевременно их обновлять, когда данные изменяются.
77

8-
Declarative views make your code more predictable and easier to debug.
8+
Декларативные представления сделают код более предсказуемым и упростят отладку.

0 commit comments

Comments
 (0)