Skip to content

Commit a49f1e8

Browse files
Merge branch 'main' into translate-conditional-rendering
2 parents d2a5629 + e5e142f commit a49f1e8

File tree

6 files changed

+411
-401
lines changed

6 files changed

+411
-401
lines changed

src/components/Layout/HomeContent.js

Lines changed: 106 additions & 101 deletions
Large diffs are not rendered by default.

src/content/learn/keeping-components-pure.md

Lines changed: 90 additions & 89 deletions
Large diffs are not rendered by default.

src/content/learn/passing-props-to-a-component.md

Lines changed: 122 additions & 124 deletions
Large diffs are not rendered by default.

src/content/reference/react-dom/client/index.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
---
2-
title: Client React DOM APIs
2+
title: İstemci React DOM API'leri
33
---
44

55
<Intro>
66

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.
88

99
</Intro>
1010

1111
---
1212

13-
## Client APIs {/*client-apis*/}
13+
## İstemci API'leri {/*client-apis*/}
1414

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
1717

1818
---
1919

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+
2126

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.

src/content/reference/react/lazy.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: lazy
44

55
<Intro>
66

7-
`lazy` lets you defer loading component's code until it is rendered for the first time.
7+
`lazy`, bileşen kodunun ilk kez render edilene kadar yüklenmesini ertelemek için kullanılır.
88

99
```js
1010
const SomeComponent = lazy(load)
@@ -16,72 +16,73 @@ const SomeComponent = lazy(load)
1616

1717
---
1818

19-
## Reference {/*reference*/}
19+
## Referans {/*reference*/}
2020

2121
### `lazy(load)` {/*lazy*/}
2222

23-
Call `lazy` outside your components to declare a lazy-loaded React component:
23+
Lazy yüklenen React bileşeni tanımlamak için bileşenlerinizin dışında `lazy`'yi çağırın:
2424

2525
```js
2626
import { lazy } from 'react';
2727

2828
const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
2929
```
3030

31-
[See more examples below.](#usage)
31+
[Daha fazla örnek için aşağıya bakın.](#usage)
3232

33-
#### Parameters {/*parameters*/}
33+
#### Parametreler {/*parameters*/}
3434

35-
* `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.
3636

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.
3840

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.
4041

4142
---
4243

43-
### `load` function {/*load*/}
44+
### `load` fonksiyonu {/*load*/}
4445

45-
#### Parameters {/*load-parameters*/}
46+
#### Parametreler {/*load-parameters*/}
4647

47-
`load` receives no parameters.
48+
`load` parametre almaz.
4849

49-
#### Returns {/*load-returns*/}
50+
#### Dönüş değerleri {/*load-returns*/}
5051

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.
5253

5354
---
5455

55-
## Usage {/*usage*/}
56+
## Kullanım {/*usage*/}
5657

57-
### Lazy-loading components with Suspense {/*suspense-for-code-splitting*/}
58+
### Suspense ile lazy yüklenen bileşenler {/*suspense-for-code-splitting*/}
5859

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:
6061

6162
```js
6263
import MarkdownPreview from './MarkdownPreview.js';
6364
```
6465

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:
6667

6768
```js
6869
import { lazy } from 'react';
6970

7071
const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
7172
```
7273

73-
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.
7475

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:
7677

7778
```js {1,4}
7879
<Suspense fallback={<Loading />}>
79-
<h2>Preview</h2>
80+
<h2>Ön İzleme</h2>
8081
<MarkdownPreview />
8182
</Suspense>
8283
```
8384

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:
8586

8687
<Sandpack>
8788

@@ -93,26 +94,26 @@ const MarkdownPreview = lazy(() => delayForDemo(import('./MarkdownPreview.js')))
9394

9495
export default function MarkdownEditor() {
9596
const [showPreview, setShowPreview] = useState(false);
96-
const [markdown, setMarkdown] = useState('Hello, **world**!');
97+
const [markdown, setMarkdown] = useState('Merhaba, **dünya**!');
9798
return (
9899
<>
99100
<textarea value={markdown} onChange={e => setMarkdown(e.target.value)} />
100101
<label>
101102
<input type="checkbox" checked={showPreview} onChange={e => setShowPreview(e.target.checked)} />
102-
Show preview
103+
Ön izlemeyi göster
103104
</label>
104105
<hr />
105106
{showPreview && (
106107
<Suspense fallback={<Loading />}>
107-
<h2>Preview</h2>
108+
<h2>Ön İzleme</h2>
108109
<MarkdownPreview markdown={markdown} />
109110
</Suspense>
110111
)}
111112
</>
112113
);
113114
}
114115

115-
// Add a fixed delay so you can see the loading state
116+
// Yükleniyor durumunu görebilmeniz için sabit bir gecikme ekleyin
116117
function delayForDemo(promise) {
117118
return new Promise(resolve => {
118119
setTimeout(resolve, 2000);
@@ -122,7 +123,7 @@ function delayForDemo(promise) {
122123

123124
```js Loading.js
124125
export default function Loading() {
125-
return <p><i>Loading...</i></p>;
126+
return <p><i>Yükleniyor...</i></p>;
126127
}
127128
```
128129

@@ -175,34 +176,34 @@ body {
175176

176177
</Sandpack>
177178

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.
179180

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)
181182

182183
---
183184

184-
## Troubleshooting {/*troubleshooting*/}
185+
## Sorun giderme {/*troubleshooting*/}
185186

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*/}
187188

188-
Do not declare `lazy` components *inside* other components:
189+
`lazy` bileşenleri diğer bileşenlerin *içerisinde* tanımlamayın:
189190

190191
```js {4-5}
191192
import { lazy } from 'react';
192193

193194
function Editor() {
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
195196
const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
196197
// ...
197198
}
198199
```
199200

200-
Instead, always declare them at the top level of your module:
201+
Bunun yerine daima modülünüzün en üst kapsamında tanımlayın:
201202

202203
```js {3-4}
203204
import { lazy } from 'react';
204205

205-
//Good: Declare lazy components outside of your components
206+
//Güzel: Lazy bileşenleri bileşenlerinizin dışında tanımlayın
206207
const MarkdownPreview = lazy(() => import('./MarkdownPreview.js'));
207208

208209
function Editor() {

0 commit comments

Comments
 (0)