Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate and fix #600

Merged
merged 6 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/content/reference/react/StrictMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ root.render(

Strict Modu aşağıdaki geliştirici davranışlarını etkinleştirir:

- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
- Your components will [re-run refs callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
- Bileşenleriniz, saf olmayan render'dan kaynaklanan hataları bulmak için [bir ekstra kez yeniden render edilmiştir](#fixing-bugs-found-by-double-rendering-in-development).
- Bileşenleriniz, eksik Effect temizliklerinden kaynaklanan hataları bulmak için [bir ekstra kez Efekt'leri yeniden çalıştırır](#fixing-bugs-found-by-re-running-effects-in-development).
- Bileşenleriniz, eksik ref temizliklerinden kaynaklanan hataları bulmak için [bir ekstra kez ref geri çağırmalarını yeniden çalıştırır](#fixing-bugs-found-by-re-running-ref-callbacks-in-development).
- Bileşenleriniz, [deprecate edilmiş API'lerin kullanımına karşı kontrol edilir](#fixing-deprecation-warnings-enabled-by-strict-mode).

#### Prop'lar {/*props*/}

Expand Down Expand Up @@ -86,10 +86,10 @@ Strict Mod kontrolleri **yalnızca geliştirme aşamasında çalıştırılsa da

Strict Modu geliştirme sırasında aşağıdaki kontrolleri etkinleştirir:

- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
- Your components will [re-run ref callbacks an extra time](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
- Bileşenleriniz, saf olmayan render'dan kaynaklanan hataları bulmak için [bir ekstra kez yeniden render edilir](#fixing-bugs-found-by-double-rendering-in-development).
- Bileşenleriniz, eksik Effect temizliklerinden kaynaklanan hataları bulmak için [bir ekstra kez Effect'leri yeniden çalıştırır](#fixing-bugs-found-by-re-running-effects-in-development).
- Bileşenleriniz, eksik ref temizliklerinden kaynaklanan hataları bulmak için [bir ekstra kez ref geri çağırmalarını yeniden çalıştırır](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development).
- Bileşenleriniz, [deprecate edilmiş API'lerin kullanımına karşı kontrol edilir](#fixing-deprecation-warnings-enabled-by-strict-mode).

**Tüm bu kontroller yalnızca geliştirme sırasında çalıştırılar ve canlıda herhangi bir etkisi yoktur.**

Expand Down
74 changes: 37 additions & 37 deletions src/content/reference/react/Suspense.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ export default function Albums({ artistId }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemini yapma şekliniz, birlikte kullandığınız çatıya bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir çatı içinde yer alır.

let cache = new Map();

Expand All @@ -141,7 +141,7 @@ async function getData(url) {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down Expand Up @@ -334,9 +334,9 @@ export default function Albums({ artistId }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemini yapma şekliniz, birlikte kullandığınız çatıya bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir çatı içinde yer alır.

let cache = new Map();

Expand All @@ -358,7 +358,7 @@ async function getData(url) {
}

async function getBio() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 1500);
});
Expand All @@ -370,7 +370,7 @@ async function getBio() {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down Expand Up @@ -596,9 +596,9 @@ export default function Albums({ artistId }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemini yapma şekliniz, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -620,7 +620,7 @@ async function getData(url) {
}

async function getBio() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand All @@ -632,7 +632,7 @@ async function getBio() {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down Expand Up @@ -780,9 +780,9 @@ export default function SearchResults({ query }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemi, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -802,7 +802,7 @@ async function getData(url) {
}

async function getSearchResults(query) {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand Down Expand Up @@ -964,9 +964,9 @@ export default function SearchResults({ query }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemi, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -986,7 +986,7 @@ async function getData(url) {
}

async function getSearchResults(query) {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand Down Expand Up @@ -1223,9 +1223,9 @@ export default function Panel({ children }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemi, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -1247,7 +1247,7 @@ async function getData(url) {
}

async function getBio() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand All @@ -1259,7 +1259,7 @@ async function getBio() {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down Expand Up @@ -1535,9 +1535,9 @@ export default function Panel({ children }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemi, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -1559,7 +1559,7 @@ async function getData(url) {
}

async function getBio() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand All @@ -1571,7 +1571,7 @@ async function getBio() {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down Expand Up @@ -1846,9 +1846,9 @@ export default function Panel({ children }) {
```

```js src/data.js hidden
// Note: the way you would do data fetching depends on
// the framework that you use together with Suspense.
// Normally, the caching logic would be inside a framework.
// Not: Veri çekme işlemi, birlikte kullandığınız framework'e bağlıdır
// ve Suspense ile birlikte çalışır.
// Normalde, önbellekleme mantığı bir framework içinde yer alır.

let cache = new Map();

Expand All @@ -1870,7 +1870,7 @@ async function getData(url) {
}

async function getBio() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 500);
});
Expand All @@ -1882,7 +1882,7 @@ async function getBio() {
}

async function getAlbums() {
// Add a fake delay to make waiting noticeable.
// Beklemeyi fark edilebilir hale getirmek için sahte bir gecikme ekleyin.
await new Promise(resolve => {
setTimeout(resolve, 3000);
});
Expand Down
4 changes: 2 additions & 2 deletions src/content/reference/react/createContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function App() {
}
```

#### Props {/*provider-props*/}
#### Proplar {/*provider-props*/}

* `value`: Ne kadar derin olursa olsun, bu sağlayıcının içindeki contexti okuyan tüm bileşenlere aktarmak istediğiniz değer. Context değeri herhangi bir türde olabilir. Sağlayıcı içinde [`useContext(SomeContext)`](/reference/react/useContext) kullanan bir bileşen,
üzerindeki en içte bulunan ilgili context sağlayıcısının `value` değerini alır.
Expand All @@ -85,7 +85,7 @@ function Button() {
}
```

Although this older way still works, **newly written code should read context with [`useContext()`](/reference/react/useContext) instead:**
Bu eski yöntem hala çalışsa da, **yeni yazılan kodlar bunun yerine [`useContext()`](/reference/react/useContext) ile context okumalıdır:**

```js
function Button() {
Expand Down
6 changes: 3 additions & 3 deletions src/content/reference/react/startTransition.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: startTransition

<Intro>

`startTransition` lets you render a part of the UI in the background.
`startTransition`, UI'nin bir kısmını arka planda render etmenizi sağlar.

```js
startTransition(action)
Expand Down Expand Up @@ -41,7 +41,7 @@ function TabContainer() {

#### Parametreler {/*parameters*/}

* `action`: A function that updates some state by calling one or more [`set` functions](/reference/react/useState#setstate). React calls `action` immediately with no parameters and marks all state updates scheduled synchronously during the `action` function call as Transitions. Any async calls awaited in the `action` will be included in the transition, but currently require wrapping any `set` functions after the `await` in an additional `startTransition` (see [Troubleshooting](/reference/react/useTransition#react-doesnt-treat-my-state-update-after-await-as-a-transition)). State updates marked as Transitions will be [non-blocking](#marking-a-state-update-as-a-non-blocking-transition) and [will not display unwanted loading indicators.](/reference/react/useTransition#preventing-unwanted-loading-indicators).
* `action`: Bir veya birden fazla [`set` fonksiyonu](/reference/react/useState#setstate) çağırarak bazı Stateleri güncelleyen bir fonksiyon. React, `action` fonksiyonunu hemen parametresiz olarak çağırır ve `action` fonksiyonu çağrıldığında senkronize olarak planlanan tüm State güncellemelerini Transition olarak işaretler. `action` içinde beklenen herhangi bir async çağrı, geçişe dahil edilecektir, ancak şu anda `await` sonrası herhangi bir `set` fonksiyonunun ek bir `startTransition` içinde sarılması gerekmektedir (bkz. [Sorun Giderme](/reference/react/useTransition#react-doesnt-treat-my-state-update-after-await-as-a-transition)). Transition olarak işaretlenen durum güncellemeleri [bloklanmayan](#marking-a-state-update-as-a-non-blocking-transition) olacak ve [istenmeyen yükleme göstergelerini göstermeyecektir.](/reference/react/useTransition#preventing-unwanted-loading-indicators).

#### Dönen değerler {/*returns*/}

Expand All @@ -61,7 +61,7 @@ function TabContainer() {

* Transition güncellemeleri, metin girişlerini kontrol etmek için kullanılamaz.

* If there are multiple ongoing Transitions, React currently batches them together. This is a limitation that may be removed in a future release.
* Birden fazla devam eden Transition varsa, React şu anda bunları birleştirir. Bu, gelecekteki bir sürümde kaldırılabilecek bir sınırlamadır.

---

Expand Down
22 changes: 9 additions & 13 deletions src/content/reference/react/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ The `use` API returns the value that was read from the resource like the resolve

#### Caveats {/*caveats*/}

* The `use` API must be called inside a Component or a Hook.
* When fetching data in a [Server Component](/reference/rsc/server-components), prefer `async` and `await` over `use`. `async` and `await` pick up rendering from the point where `await` was invoked, whereas `use` re-renders the component after the data is resolved.
* Prefer creating Promises in [Server Components](/reference/rsc/server-components) and passing them to [Client Components](/reference/rsc/use-client) over creating Promises in Client Components. Promises created in Client Components are recreated on every render. Promises passed from a Server Component to a Client Component are stable across re-renders. [See this example](#streaming-data-from-server-to-client).

* `use` API, bir bileşen veya bir hook'un içerisinde çağırılmak zorundadır..
* Bir [Sunucu Bileşeni](/reference/react/use-server) içerisinde veri çekilirken, `use` yerine `async` ve `await` kullanmayı tercih edin. `async` ve `await`, oluşturma işlemini `await` ifadesinin çağırıldığı noktadan devam ettirirken; `use`, veri çözümlendikten sonra bileşeni yeniden oluşturur.
* [Sunucu Bileşeni](/reference/react/use-server) içerisinde Promise oluşturup [İstemci Bileşeni](/reference/react/use-client) içerisine aktarmak yerine Promise'i [İstemci Bileşeni](/reference/react/use-client) içerisinde oluşturmayı tercih edin. İstemci Bileşeni içerisine eklenen Promise'ler her oluşturma işlemi sırasında yeniden oluşturulur. Sunucu Bileşeninden İstemci Bileşenine aktarılan Promise'ler ise yeniden oluşturma işlemleri sırasında sabit kalır. [Bu örneği inceleyin](#streaming-data-from-server-to-client).
* `use` API'si bir Bileşen veya Hook içinde çağrılmalıdır.
* [Sunucu Bileşenleri](/reference/rsc/server-components) içinde veri çekerken, `use` yerine `async` ve `await` kullanmayı tercih edin. `async` ve `await`, `await` çağrıldığında render'a başlar, oysa `use` veri çözümlandıktan sonra bileşeni yeniden render eder.
* [Sunucu Bileşenleri](/reference/rsc/server-components) içinde Promise'ler oluşturmayı ve bunları [İstemci Bileşenleri](/reference/rsc/use-client) içine iletmeyi, İstemci Bileşenleri içinde Promise'ler oluşturmaya tercih edin. Client Bileşenleri içinde oluşturulan Promise'ler her render işleminde yeniden oluşturulur. Sunucu Bileşenlerin'den İstemci Bileşenleri'e geçirilen Promise'ler yeniden render'lar arasında sabittir. [Bu örneğe bakın](#streaming-data-from-server-to-client).
---

## Kullanım {/*usage*/}
Expand Down Expand Up @@ -281,9 +277,9 @@ import React, { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './styles.css';

// TODO: update this example to use
// the Codesandbox Server Component
// demo environment once it is created
// TODO: Bu örneği,
// Codesandbox Sunucu Bileşeni
// demo ortamı oluşturulduğunda güncelleyin
import App from './App';

const root = createRoot(document.getElementById('root'));
Expand Down Expand Up @@ -388,9 +384,9 @@ import React, { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './styles.css';

// TODO: update this example to use
// the Codesandbox Sunucu Component
// demo environment once it is created
// TODO: Bu örneği,
// Codesandbox Sunucu Bileşeni
// demo ortamı oluşturulduğunda güncelleyin
import App from './App';

const root = createRoot(document.getElementById('root'));
Expand Down
Loading