You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/client/index.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,26 @@
1
1
---
2
-
title: Client React DOM APIs
2
+
title: İstemci React DOM API'leri
3
3
---
4
4
5
5
<Intro>
6
6
7
-
The `react-dom/client`APIs let you render React components on the client (in the browser). These APIs are typically used at the top level of your app to initialize your React tree. A [framework](/learn/start-a-new-react-project#production-grade-react-frameworks)may call them for you. Most of your components don't need to import or use them.
7
+
`React-dom/client`API'leri, React bileşenlerini istemcide (tarayıcıda) oluşturmanızı sağlar. Bu API’ler genellikle React ağacınızı başlatmak için uygulamanızın en üst seviyesinde kullanılır. Bir [çatı](/learn/start-a-new-react-project#production-grade-react-frameworks)bunları sizin için çağırabilir. Bileşenlerinizin çoğu, bunları içe aktarmaya veya kullanmaya ihtiyaç duymaz.
8
8
9
9
</Intro>
10
10
11
11
---
12
12
13
-
## Client APIs {/*client-apis*/}
13
+
## İstemci API'leri {/*client-apis*/}
14
14
15
-
*[`createRoot`](/reference/react-dom/client/createRoot)lets you create a root to display React components inside a browser DOM node.
16
-
*[`hydrateRoot`](/reference/react-dom/client/hydrateRoot)lets you display React components inside a browser DOM node whose HTML content was previously generated by [`react-dom/server`.](/reference/react-dom/server)
15
+
*[`createRoot`](/reference/react-dom/client/createRoot)React bileşenlerini bir tarayıcı DOM düğümü içinde görüntülemek için bir kök oluşturmanızı sağlar.
16
+
*[`hydrateRoot`](/reference/react-dom/client/hydrateRoot) React bileşenlerini, HTML içeriği daha önce [`react-dom/server`.](/reference/react-dom/server) tarafından oluşturulmuş bir tarayıcı DOM düğümü içinde görüntülemenizi sağlar
17
17
18
18
---
19
19
20
-
## Browser support {/*browser-support*/}
20
+
## Tarayıcı desteği {/*browser-support*/}
21
+
22
+
React, Internet Explorer 9 ve üzeri dahil olmak üzere tüm popüler tarayıcıları destekler. IE 9 ve IE 10 gibi eski tarayıcılarda bazı polyfill'ler gereklidir.
23
+
24
+
25
+
21
26
22
-
React supports all popular browsers, including Internet Explorer 9 and above. Some polyfills are required for older browsers such as IE 9 and IE 10.
*`load`: A function that returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)or another *thenable* (a Promise-like object with a `then`method). React will not call `load` until the first time you attempt to render the returned component. After React first calls `load`, it will wait for it to resolve, and then render the resolved value as a React component. Both the returned Promise and the Promise's resolved value will be cached, so React will not call `load` more than once. If the Promise rejects, React will `throw` the rejection reason for the nearest Error Boundary to handle.
35
+
*`load`: [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)veya başka bir *thenable* (`then`metoduna sahip Promise benzeri bir nesne) döndürmeniz gerekir. React, dönen bileşeni ilk kez render etmeye yeltenene kadar `load`'ı çağırmaz. React `load`'ı ilk çağırdığında, çözümlenene (resolve) kadar bekler, ardından çözümlenmiş değeri React bileşeni olarak render eder. Hem Promise hem de Promise'in çözümlenmiş değeri ön belleğe (cache) alınacağından, React `load`'ı birden fazla kez çağırmaz. Promise reddedilirse (reject), React reddetme nedenini ele alması için `throw` ile en yakındaki Error Boundary'ye gönderir.
36
36
37
-
#### Returns {/*returns*/}
37
+
#### Dönüş değerleri {/*returns*/}
38
+
39
+
`lazy`, ağacınıza render edebileceğiniz bir React bileşeni döndürür. Lazy bileşenin kodu yüklenirken, render etme işlemi *askıya alınır.* Yükleme esnasında yükleniyor göstergesi görüntülemek için [`<Suspense>`](/reference/react/Suspense) kullanın.
38
40
39
-
`lazy` returns a React component you can render in your tree. While the code for the lazy component is still loading, attempting to render it will *suspend.* Use [`<Suspense>`](/reference/react/Suspense) to display a loading indicator while it's loading.
40
41
41
42
---
42
43
43
-
### `load`function {/*load*/}
44
+
### `load`fonksiyonu {/*load*/}
44
45
45
-
#### Parameters {/*load-parameters*/}
46
+
#### Parametreler {/*load-parameters*/}
46
47
47
-
`load`receives no parameters.
48
+
`load`parametre almaz.
48
49
49
-
#### Returns {/*load-returns*/}
50
+
#### Dönüş değerleri {/*load-returns*/}
50
51
51
-
You need to return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)or some other*thenable* (a Promise-like object with a `then`method). It needs to eventually resolve to a valid React component type, such as a function, [`memo`](/reference/react/memo), or a[`forwardRef`](/reference/react/forwardRef) component.
52
+
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)veya başka bir*thenable* (`then`metoduna sahip Promise benzeri bir nesne) döndürmeniz gerekir. Bu nesne; fonksiyon, [`memo`](/reference/react/memo) ya da[`forwardRef`](/reference/react/forwardRef)'de olduğu gibi geçerli bir React bileşen tipine çözülmelidir.
52
53
53
54
---
54
55
55
-
## Usage {/*usage*/}
56
+
## Kullanım {/*usage*/}
56
57
57
-
### Lazy-loading components with Suspense {/*suspense-for-code-splitting*/}
58
+
### Suspense ile lazy yüklenen bileşenler {/*suspense-for-code-splitting*/}
58
59
59
-
Usually, you import components with the static [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)declaration:
60
+
Bileşenlerinizi çoğunlukla statik [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)tanımıyla içe aktarırsınız:
60
61
61
62
```js
62
63
importMarkdownPreviewfrom'./MarkdownPreview.js';
63
64
```
64
65
65
-
To defer loading this component's code until it's rendered for the first time, replace this import with:
66
+
Bileşen kodunun yüklenmesini ilk render'a kadar ertelemek istiyorsanız, şu içe aktarmayla değiştirin:
This code relies on [dynamic`import()`,](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) which might require support from your bundler or framework.
74
+
Bu kod, [dinamik`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import)'a dayanır. Kullanmak için paketleyicinizin (bundler) veya framework'ünüzün desteklemesi gerekir.
74
75
75
-
Now that your component's code loads on demand, you also need to specify what should be displayed while it is loading. You can do this by wrapping the lazy component or any of its parents into a [`<Suspense>`](/reference/react/Suspense) boundary:
76
+
Artık bileşeninizin kodları talep edildiğinde (on demand) yüklendiğine göre, yüklenme aşamasında yerine neyin görüntüleneceğini belirtmeniz gerekir. Bunu, lazy bileşeni ya da üst bileşenlerinden birini [`<Suspense>`](/reference/react/Suspense)sınırına (boundary) sararak yapabilirsiniz:
76
77
77
78
```js {1,4}
78
79
<Suspense fallback={<Loading />}>
79
-
<h2>Preview</h2>
80
+
<h2>Ön İzleme</h2>
80
81
<MarkdownPreview />
81
82
</Suspense>
82
83
```
83
84
84
-
In this example, the code for `MarkdownPreview` won't be loaded until you attempt to render it. If `MarkdownPreview`hasn't loaded yet,`Loading`will be shown in its place. Try ticking the checkbox:
85
+
Bu örnekte, `MarkdownPreview`'ın kodu render edilene kadar yüklenmez. `MarkdownPreview`yüklenene kadar yerine`Loading`gösterilir. Onay kutusunu işaretlemeyi deneyin:
//Add a fixed delay so you can see the loading state
116
+
//Yükleniyor durumunu görebilmeniz için sabit bir gecikme ekleyin
116
117
functiondelayForDemo(promise) {
117
118
returnnewPromise(resolve=> {
118
119
setTimeout(resolve, 2000);
@@ -122,7 +123,7 @@ function delayForDemo(promise) {
122
123
123
124
```js Loading.js
124
125
exportdefaultfunctionLoading() {
125
-
return<p><i>Loading...</i></p>;
126
+
return<p><i>Yükleniyor...</i></p>;
126
127
}
127
128
```
128
129
@@ -175,34 +176,34 @@ body {
175
176
176
177
</Sandpack>
177
178
178
-
This demo loads with an artificial delay. The next time you untick and tick the checkbox, `Preview`will be cached, so there will be no loading state. To see the loading state again, click "Reset" on the sandbox.
179
+
Bu demo, yapay bir gecikmeyle yüklenir. Bileşen yüklendikten sonras işareti kaldırıp yeniden işaretlediğinizde `Preview`ön belleğe alındığı için yükleniyor durumu olmaz. Yükleniyor durumunu yeniden görmek isterseniz, sandbox'daki "Sıfırla" butonuna tıklayın.
179
180
180
-
[Learn more about managing loading states with Suspense.](/reference/react/Suspense)
181
+
[Suspense ile yükleniyor durumlarını yönetmek hakkında daha fazla bilgi edinin.](/reference/react/Suspense)
181
182
182
183
---
183
184
184
-
## Troubleshooting {/*troubleshooting*/}
185
+
## Sorun giderme {/*troubleshooting*/}
185
186
186
-
### My `lazy`component's state gets reset unexpectedly {/*my-lazy-components-state-gets-reset-unexpectedly*/}
187
+
### `lazy`bileşenimdeki state'ler beklenmedik şekilde sıfırlanıyor {/*my-lazy-components-state-gets-reset-unexpectedly*/}
187
188
188
-
Do not declare `lazy`components *inside* other components:
189
+
`lazy`bileşenleri diğer bileşenlerin *içerisinde* tanımlamayın:
189
190
190
191
```js {4-5}
191
192
import { lazy } from'react';
192
193
193
194
functionEditor() {
194
-
// 🔴 Bad: This will cause all state to be reset on re-renders
195
+
// 🔴 Kötü: Bu yeniden render'larda tüm state'lerin sıfırlanmasına neden olur
0 commit comments