fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,49 @@
---
title: Compose React Components
localeTitle: Компоновка компонентов реакции
---
## Компоновка компонентов реакции
### намек
Используйте вложенные компоненты, как в предыдущем challemge, для рендеринга компонентов.
### Решение
Следующее - решение чакенге, где оно отображает цитрусовые и NonCitrus в компоненте, который затем отображается в другом:
```jsx
class Fruits extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h2>Fruits:</h2>
<NonCitrus />
<Citrus />
</div>
);
}
};
class TypesOfFood extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<Fruits />
<Vegetables />
</div>
);
}
};
```
### Полезные ссылки:
* [Компоненты и реквизит](https://reactjs.org/docs/components-and-props.html)
* [Вложенные компоненты](http://www.reactjstutorial.net/nested-components.html)