Skip to content

Commit 9816083

Browse files
authored
Merge pull request #608 from reactjs/anilcanboga/children
translate children page
2 parents 0f07e13 + 63edea0 commit 9816083

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

src/content/reference/react/Children.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Children
2+
title: Children (Alt Eleman)
33
---
44

55
<Pitfall>
66

7-
Using `Children` is uncommon and can lead to fragile code. [See common alternatives.](#alternatives)
7+
`Children` kullanımı nadirdir ve kırılgan koda yol açabilir. [Yaygın alternatiflere bakın.](#alternatives)
88

99
</Pitfall>
1010

1111
<Intro>
1212

13-
`Children` lets you manipulate and transform the JSX you received as the [`children` prop.](/learn/passing-props-to-a-component#passing-jsx-as-children)
13+
`Children`, [`children` prop'u](/learn/passing-props-to-a-component#passing-jsx-as-children) olarak aldığınız JSX'i değiştirmenize ve dönüştürmenize olanak tanır
1414

1515
```js
1616
const mappedChildren = Children.map(children, child =>
@@ -27,44 +27,44 @@ const mappedChildren = Children.map(children, child =>
2727

2828
---
2929

30-
## Reference {/*reference*/}
30+
## Başvuru Dokümanı {/*reference*/}
3131

3232
### `Children.count(children)` {/*children-count*/}
3333

34-
Call `Children.count(children)` to count the number of children in the `children` data structure.
34+
Children veri yapısındaki alt eleman sayısını saymak için `Children.count(children)` öğesini çağırın.
3535

3636
```js src/RowList.js active
3737
import { Children } from 'react';
3838

3939
function RowList({ children }) {
4040
return (
4141
<>
42-
<h1>Total rows: {Children.count(children)}</h1>
42+
<h1>Toplam satır: {Children.count(children)}</h1>
4343
...
4444
</>
4545
);
4646
}
4747
```
4848

49-
[See more examples below.](#counting-children)
49+
[Aşağıda daha fazla örneğe bakın.](#counting-children)
5050

51-
#### Parameters {/*children-count-parameters*/}
51+
#### Parametreler {/*children-count-parameters*/}
5252

53-
* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component.
53+
* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri.
5454

5555
#### Returns {/*children-count-returns*/}
5656

57-
The number of nodes inside these `children`.
57+
Bu `children` içindeki node'ların sayısı.
5858

59-
#### Caveats {/*children-count-caveats*/}
59+
#### Uyarılar {/*children-count-caveats*/}
6060

61-
- Empty nodes (`null`, `undefined`, and Booleans), strings, numbers, and [React elements](/reference/react/createElement) count as individual nodes. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed.
61+
- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elemanları](/reference/react/createElement) ayrı node'lar olarak sayılır. Diziler tek tek node'lar olarak sayılmaz, ancak alt elemanları sayılır. **Çaprazlama React öğelerinden daha derine gitmez:** bunlar işlenmez ve alt öğeleri çaprazlanmaz. [Fragments](/reference/react/Fragment) geçilmez.
6262

6363
---
6464

6565
### `Children.forEach(children, fn, thisArg?)` {/*children-foreach*/}
6666

67-
Call `Children.forEach(children, fn, thisArg?)` to run some code for each child in the `children` data structure.
67+
Children veri yapısındaki her alt eleman için bazı kodlar çalıştırmak üzere `Children.forEach(children, fn, thisArg?)` öğesini çağırın.
6868

6969
```js src/RowList.js active
7070
import { Children } from 'react';
@@ -78,27 +78,27 @@ function SeparatorList({ children }) {
7878
// ...
7979
```
8080
81-
[See more examples below.](#running-some-code-for-each-child)
81+
[Aşağıda daha fazla örneğe bakın](#running-some-code-for-each-child)
8282
83-
#### Parameters {/*children-foreach-parameters*/}
83+
#### Parametreler {/*children-foreach-parameters*/}
8484
85-
* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component.
86-
* `fn`: The function you want to run for each child, similar to the [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call.
87-
* **optional** `thisArg`: The [`this` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) with which the `fn` function should be called. If omitted, it's `undefined`.
85+
* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri.
86+
* `fn`: Her çocuk için çalıştırmak istediğiniz işlev, [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback'e benzer. İlk argüman olarak alt eleman ve ikinci argüman olarak indeksi ile çağrılacaktır. İndeks `0`dan başlar ve her çağrıda artar.
87+
* **isteğe bağlı** `thisArg`: `fn` fonksiyonunun çağrılması gereken [`this` değeri](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this). Atlanırsa, `tanımlanmamış` olur.
8888
8989
#### Returns {/*children-foreach-returns*/}
9090
91-
`Children.forEach` returns `undefined`.
91+
`Children.forEach` öğesi `undefined` döndürür.
9292
93-
#### Caveats {/*children-foreach-caveats*/}
93+
#### Uyarılar {/*children-foreach-caveats*/}
9494
95-
- Empty nodes (`null`, `undefined`, and Booleans), strings, numbers, and [React elements](/reference/react/createElement) count as individual nodes. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed.
95+
- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elements](/reference/react/createElement) ayrı node'lar olarak sayılır. Diziler tek tek node'lar olarak sayılmaz, ancak alt elemanları sayılır. **Çaprazlama React öğelerinden daha derine gitmez:** bunlar işlenmez ve alt öğeleri çaprazlanmaz. [Fragments](/referans/react/Fragment) çaprazlanmaz.
9696
9797
---
9898
9999
### `Children.map(children, fn, thisArg?)` {/*children-map*/}
100100
101-
Call `Children.map(children, fn, thisArg?)` to map or transform each child in the `children` data structure.
101+
Alt eleman veri yapısındaki her alt elemani eşlemek veya dönüştürmek için `Children.map(children, fn, thisArg?)` öğesini çağırın.
102102
103103
```js src/RowList.js active
104104
import { Children } from 'react';
@@ -116,11 +116,11 @@ function RowList({ children }) {
116116
}
117117
```
118118
119-
[See more examples below.](#transforming-children)
119+
[Aşağıda daha fazla örneğe bakınız.](#transforming-children)
120120
121121
#### Parameters {/*children-map-parameters*/}
122122
123-
* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component.
123+
* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri.
124124
* `fn`: The mapping function, similar to the [array `map` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) callback. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call. You need to return a React node from this function. This may be an empty node (`null`, `undefined`, or a Boolean), a string, a number, a React element, or an array of other React nodes.
125125
* **optional** `thisArg`: The [`this` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) with which the `fn` function should be called. If omitted, it's `undefined`.
126126
@@ -141,33 +141,33 @@ Otherwise, returns a flat array consisting of the nodes you've returned from the
141141
### `Children.only(children)` {/*children-only*/}
142142
143143
144-
Call `Children.only(children)` to assert that `children` represent a single React element.
144+
Alt elemanların tek bir React öğesini temsil ettiğini doğrulamak için `Children.only(children)` öğesini çağırın.
145145
146146
```js
147147
function Box({ children }) {
148148
const element = Children.only(children);
149149
// ...
150150
```
151151
152-
#### Parameters {/*children-only-parameters*/}
152+
#### Parametreler {/*children-only-parameters*/}
153153
154-
* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component.
154+
* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri.
155155
156156
#### Returns {/*children-only-returns*/}
157157
158-
If `children` [is a valid element,](/reference/react/isValidElement) returns that element.
158+
Eğer `children` [geçerli bir eleman ise,](/reference/react/isValidElement) bu elemanı döndürür.
159159
160-
Otherwise, throws an error.
160+
Aksi takdirde hata verir.
161161
162-
#### Caveats {/*children-only-caveats*/}
162+
#### Uyarılar {/*children-only-caveats*/}
163163
164-
- This method always **throws if you pass an array (such as the return value of `Children.map`) as `children`.** In other words, it enforces that `children` is a single React element, not that it's an array with a single element.
164+
- Bu yöntem **`children` olarak bir dizi (örneğin, `Children.map`'in dönüş değeri) geçirirseniz her zaman hata fırlatır.** Başka bir deyişle, `children`'ın tek bir React öğesi olmasını zorunlu kılar, ancak bu bir öğe içeren bir dizi olması anlamına gelmez.
165165
166166
---
167167
168168
### `Children.toArray(children)` {/*children-toarray*/}
169169
170-
Call `Children.toArray(children)` to create an array out of the `children` data structure.
170+
Alt eleman veri yapısından bir dizi oluşturmak için `Children.toArray(çocuklar)` öğesini çağırın.
171171
172172
```js src/ReversedList.js active
173173
import { Children } from 'react';
@@ -178,25 +178,25 @@ export default function ReversedList({ children }) {
178178
// ...
179179
```
180180
181-
#### Parameters {/*children-toarray-parameters*/}
181+
#### Parametreler {/*children-toarray-parameters*/}
182182
183-
* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component.
183+
* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri.
184184
185185
#### Returns {/*children-toarray-returns*/}
186186
187-
Returns a flat array of elements in `children`.
187+
`children` içindeki elemanların düz bir dizisini döndürür.
188188
189-
#### Caveats {/*children-toarray-caveats*/}
189+
#### Uyarılar {/*children-toarray-caveats*/}
190190
191-
- Empty nodes (`null`, `undefined`, and Booleans) will be omitted in the returned array. **The returned elements' keys will be calculated from the original elements' keys and their level of nesting and position.** This ensures that flattening the array does not introduce changes in behavior.
191+
- Boş node'lar (`null`, `undefined` ve Booleans) döndürülen dizide atlanacaktır. **Döndürülen öğelerin anahtarları, orijinal öğelerin anahtarlarından, iç içe geçme düzeylerinden ve konumlarından hesaplanacaktır.** Bu, dizinin düzleştirilmesinin davranışta değişikliklere yol açmamasını sağlar.
192192
193193
---
194194
195-
## Usage {/*usage*/}
195+
## Kullanım {/*usage*/}
196196
197-
### Transforming children {/*transforming-children*/}
197+
### Children'ı dönüştürmek {/*transforming-children*/}
198198
199-
To transform the children JSX that your component [receives as the `children` prop,](/learn/passing-props-to-a-component#passing-jsx-as-children) call `Children.map`:
199+
Bileşeninizin [`children` prop`u olarak aldığı](/learn/passing-props-to-a-component#passing-jsx-as-children) JSX çocuklarını dönüştürmek için `Children.map` çağrısını yapın:
200200

201201
```js {6,10}
202202
import { Children } from 'react';
@@ -214,7 +214,7 @@ function RowList({ children }) {
214214
}
215215
```
216216

217-
In the example above, the `RowList` wraps every child it receives into a `<div className="Row">` container. For example, let's say the parent component passes three `<p>` tags as the `children` prop to `RowList`:
217+
Yukarıdaki örnekte, `RowList` aldığı her children'ı bir `<div className=Row>` konteynerine sarar. Örneğin, ana bileşenin `RowList` öğesine `children` prop'u olarak üç `<p>` etiketi ilettiğini varsayalım:
218218

219219
```js
220220
<RowList>

0 commit comments

Comments
 (0)