diff --git a/content/docs/composition-vs-inheritance.md b/content/docs/composition-vs-inheritance.md
index c86735ef7..678388277 100644
--- a/content/docs/composition-vs-inheritance.md
+++ b/content/docs/composition-vs-inheritance.md
@@ -1,6 +1,6 @@
---
id: composition-vs-inheritance
-title: Composition vs Inheritance
+title: Kompozisiya vs Varislik
permalink: docs/composition-vs-inheritance.html
redirect_from:
- "docs/multiple-components.html"
@@ -8,15 +8,15 @@ prev: lifting-state-up.html
next: thinking-in-react.html
---
-React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components.
+React-in çox güclü kompozisiya modeli olduğundan komponentlər arasında kodu paylaşa bilmək üçün varislik əvəzinə kompozisiyadan istifadə etməyi tövsiyyə edirik.
-In this section, we will consider a few problems where developers new to React often reach for inheritance, and show how we can solve them with composition.
+Bu bölmədə, React-ə yeni başlayan proqramçıların ilk yanaşmada varisliyə əl atdıqları problemləri nəzərə alıb, bu problemlərin kompozisiya ilə həllini göstərəcəyik.
-## Containment {#containment}
+## Saxlama {#containment}
-Some components don't know their children ahead of time. This is especially common for components like `Sidebar` or `Dialog` that represent generic "boxes".
+Bəzi komponentlərin əvvəlcədən uşaqları haqqında məlumatları yoxdur. Bu vəziyyət daha çox ümumi konteynerlər təsvir edən `Sidebar` və ya `Dialog` kimi komponentlərdə baş verir.
-We recommend that such components use the special `children` prop to pass children elements directly into their output:
+Belə komponentlərin nəticəsinə uşaq komponentləri birbaşa göndərə bilmək üçün xüsusi `children` propundan istifadə etməyi tövsiyyə edirik:
```js{4}
function FancyBorder(props) {
@@ -28,28 +28,28 @@ function FancyBorder(props) {
}
```
-This lets other components pass arbitrary children to them by nesting the JSX:
+`children` propundan istifadə etdikdə uşaqları komponentlərə JSX təqinin içərisindən göndərə bilərsiniz:
```js{4-9}
function WelcomeDialog() {
return (
- Welcome
+ Xoş Gəlmisiniz
- Thank you for visiting our spacecraft!
+ Kosmik gəmimizi ziyarət etdiyiniz üçün təşəkkür edirik!
);
}
```
-**[Try it on CodePen](https://codepen.io/gaearon/pen/ozqNOV?editors=0010)**
+**[CodePen-də sınayın](https://codepen.io/gaearon/pen/ozqNOV?editors=0010)**
-Anything inside the `` JSX tag gets passed into the `FancyBorder` component as a `children` prop. Since `FancyBorder` renders `{props.children}` inside a `
`, the passed elements appear in the final output.
+`` JSX təqinin daxilində göndərilən bütün elementlər, `FancyBorder` komponentinin `children` propundan yerləşdirilir. `FancyBorder` `
`-də `{props.children}` render etdiyindən, göndərilən elementlər son nəticədə görünəcəklər.
-While this is less common, sometimes you might need multiple "holes" in a component. In such cases you may come up with your own convention instead of using `children`:
+Daha az işlənməsinə baxmayaraq, bəzən komponentə bir neçə "render yeri" lazım ola bilər. Bu hallarda `children` əvəzinə öz yaratdığınız konvensiyadan istifadə edin:
```js{5,8,18,21}
function SplitPane(props) {
@@ -78,15 +78,15 @@ function App() {
}
```
-[**Try it on CodePen**](https://codepen.io/gaearon/pen/gwZOJp?editors=0010)
+[**CodePen-də sınayın**](https://codepen.io/gaearon/pen/gwZOJp?editors=0010)
-React elements like `` and `` are just objects, so you can pass them as props like any other data. This approach may remind you of "slots" in other libraries but there are no limitations on what you can pass as props in React.
+`` və `` elementlərinin obyekt olduqlarından siz bu elementləri hər hansı bir məlumat kimi proplar ilə göndərə bilərsiniz. Bu yanaşma, başqa kitabxanalarda olan "yuvalar" (slots) konsepsiyasını yadınıza sala bilər. Lakin, React-də proplar ilə nələri göndərə biləcəyinizə heç bir məhdudiyyət yoxdur.
-## Specialization {#specialization}
+## Xüsusiləşmə {#specialization}
-Sometimes we think about components as being "special cases" of other components. For example, we might say that a `WelcomeDialog` is a special case of `Dialog`.
+Bəzən komponentlər digər kompontlərin "xüsusi halları" ola bilirlər. Məsələn, biz `WelcomeDialog` komponentinə `Dialog` komponentinin xüsusi halı kimi baxa bilərik.
-In React, this is also achieved by composition, where a more "specific" component renders a more "generic" one and configures it with props:
+React-də bu yanaşma da kompozisiya ilə tətbiq edilir. "Xüsusi" komponentlər "ümumi" komponentləri fərqli proplar ilə render edirlər:
```js{5,8,16-18}
function Dialog(props) {
@@ -105,15 +105,15 @@ function Dialog(props) {
function WelcomeDialog() {
return (
+ title="Xoş Gəlmisiniz"
+ message="Kosmik gəmimizi ziyarət etdiyiniz üçün təşəkkür edirik!" />
);
}
```
-[**Try it on CodePen**](https://codepen.io/gaearon/pen/kkEaOZ?editors=0010)
+[**CodePen-də sınayın**](https://codepen.io/gaearon/pen/kkEaOZ?editors=0010)
-Composition works equally well for components defined as classes:
+Klas ilə müəyyənləşdirilmiş komponentlərdə belə kompozisiya yaxşı işləyir:
```js{10,27-31}
function Dialog(props) {
@@ -140,12 +140,12 @@ class SignUpDialog extends React.Component {
render() {
return (
-