Files
freeCodeCamp/guide/russian/react/props/index.md
Egor 346b0a7ce1 docs: update Russian translation for the whole React guide (#23636)
* docs: update translation for React guide in Russian

* fix: removed extra line before frontmatter block

* fix: removed extra line in frontmatter block

* fix: corrected frontmatter block

* fix: corrected localeTitle in frontmatter block

* Update index.md

* fix: corrected localeTitle for Installation

* Update index.md

* Update index.md
2018-11-22 22:49:48 +04:00

31 lines
953 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Props
localeTitle: Props
---
### Что такое props?
Props (упр. от слова properties) - это дата, переданная в компонент. Они неизменяемы (только для чтения).
Свойства - это произвольные данные, переданные в компонент. Все компоненты React, должны действовать как чистые функции (оставлять свойства неизменными).
### Пример
```shell
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
function App() {
return (
<div>
<Welcome name="Sara" />
<Welcome name="Cahal" />
<Welcome name="Edite" />
</div>
);
}
```
name является свойством, которое через props.name может получить компонент Welcome.