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/server/renderToReadableStream.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,38 +47,38 @@ Client tarafında, server tarafından oluşturulan HTML’i interaktif hale geti
47
47
48
48
#### Parametreler {/*parameters*/}
49
49
50
-
* `reactNode`: A React node you want to render to HTML. For example, a JSX element like `<App />`. It is expected to represent the entire document, so the`App` component should render the `<html>`tag.
50
+
* `reactNode`: HTML’e render etmek istediğiniz bir React node. Örneğin `<App />` gibi bir JSX element’i. Bunun tüm dokümanı temsil etmesi beklenir, bu yüzden`App` component’i `<html>`etiketini render etmelidir.
51
51
52
-
* **optional** `options`: An object with streaming options.
53
-
* **optional** `bootstrapScriptContent`: If specified, this string will be placed in an inline `<script>`tag.
54
-
* **optional** `bootstrapScripts`: An array of string URLs for the `<script>`tags to emit on the page. Use this to include the `<script>` that calls [`hydrateRoot`.](/reference/react-dom/client/hydrateRoot) Omit it if you don't want to run React on the client at all.
55
-
* **optional** `bootstrapModules`: Like `bootstrapScripts`, but emits [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) instead.
56
-
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page. Must be the same prefix as passed to [`hydrateRoot`.](/reference/react-dom/client/hydrateRoot#parameters)
57
-
* **optional** `namespaceURI`: A string with the root [namespace URI](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#important_namespace_uris) for the stream. Defaults to regular HTML. Pass `'http://www.w3.org/2000/svg'`for SVG or`'http://www.w3.org/1998/Math/MathML'`for MathML.
58
-
* **optional** `nonce`: A [`nonce`](http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#nonce) string to allow scripts for [`script-src` Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src).
59
-
* **optional** `onError`: A callback that fires whenever there is a server error, whether [recoverable](#recovering-from-errors-outside-the-shell) or [not.](#recovering-from-errors-inside-the-shell) By default, this only calls `console.error`. If you override it to [log crash reports,](#logging-crashes-on-the-server) make sure that you still call `console.error`. You can also use it to [adjust the status code](#setting-the-status-code) before the shell is emitted.
60
-
* **optional** `progressiveChunkSize`: The number of bytes in a chunk. [Read more about the default heuristic.](https://github.com/facebook/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
61
-
* **optional** `signal`: An [abort signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that lets you [abort server rendering](#aborting-server-rendering) and render the rest on the client.
52
+
* **opsiyonel** `options`: Stream için yapılandırma seçeneklerini içeren bir obje.
53
+
* **opsiyonel** `bootstrapScriptContent`: Belirtilirse, bu string inline bir `<script>`etiketi içinde yer alır.
54
+
* **opsiyonel** `bootstrapScripts`: Sayfada emit edilecek `<script>`etiketleri için string URL’lerden oluşan bir dizi. [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) fonksiyonunu çağıran `<script>`’i eklemek için bunu kullanın. React’in client tarafında çalışmasını istemiyorsanız bunu boş bırakın.
55
+
* **opsiyonel** `bootstrapModules`: `bootstrapScripts` gibi, ancak [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) olarak emit eder.
56
+
* **opsiyonel** `identifierPrefix`: [`useId`](/reference/react/useId) tarafından üretilen ID’ler için React’in kullandığı string önek. Aynı sayfada birden fazla root kullanırken çakışmaları önlemek için faydalıdır. [`hydrateRoot`](/reference/react-dom/client/hydrateRoot#parameters) ile verilen önek ile aynı olmalıdır.
57
+
* **opsiyonel** `namespaceURI`: Stream için root [namespace URI](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#important_namespace_uris) string’i. Varsayılan olarak normal HTML. SVG için `'http://www.w3.org/2000/svg'`veya MathML için`'http://www.w3.org/1998/Math/MathML'`geçebilirsiniz.
58
+
* **opsiyonel** `nonce`: [`script-src` Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) için script’lere izin vermek amacıyla bir [`nonce`](http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#nonce) string’i.
59
+
* **opsiyonel** `onError`: Server’da bir hata oluştuğunda tetiklenen callback. Hata [recoverable](#recovering-from-errors-outside-the-shell) veya [non-recoverable](#recovering-from-errors-inside-the-shell) olabilir. Varsayılan olarak sadece `console.error` çağrılır. Bunu [crash raporlarını loglamak için](#logging-crashes-on-the-server) override ederseniz, yine de `console.error` çağırdığınızdan emin olun. Ayrıca [shell emit edilmeden önce status kodunu ayarlamak](#setting-the-status-code) için de kullanabilirsiniz.
60
+
* **opsiyonel** `progressiveChunkSize`: Bir chunk içindeki byte sayısı. [Varsayılan heuristic hakkında daha fazla bilgi.](https://github.com/facebook/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
61
+
* **opsiyonel** `signal`: [abort signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) ile server render’ı [abort edebilir](#aborting-server-rendering) ve kalan kısmı client’ta render edebilirsiniz.
62
62
63
63
64
64
#### Returns {/*returns*/}
65
65
66
66
`renderToReadableStream` returns a Promise:
67
67
68
-
- If rendering the [shell](#specifying-what-goes-into-the-shell) is successful, that Promise will resolve to a [Readable Web Stream.](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
69
-
- If rendering the shell fails, the Promise will be rejected. [Use this to output a fallback shell.](#recovering-from-errors-inside-the-shell)
68
+
- Eğer [shell](#specifying-what-goes-into-the-shell) render’ı başarılı olursa, bu Promise bir [Readable Web Stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) ile çözülür.
69
+
- Eğer shell render’ı başarısız olursa, Promise reddedilir. [Bunu bir fallback shell göstermek için kullanabilirsiniz.](#recovering-from-errors-inside-the-shell)
70
70
71
-
The returned stream has an additional property:
71
+
Return stream’in ek bir özelliği vardır:
72
72
73
-
* `allReady`: A Promise that resolves when all rendering is complete, including both the [shell](#specifying-what-goes-into-the-shell) and all additional [content.](#streaming-more-content-as-it-loads) You can `awaitstream.allReady`before returning a response [for crawlers and static generation.](#waiting-for-all-content-to-load-for-crawlers-and-static-generation) If you do that, you won't get any progressive loading. The stream will contain the final HTML.
73
+
* `allReady`: Tüm render işlemi tamamlandığında çözülen bir Promise, bu hem [shell](#specifying-what-goes-into-the-shell) hem de tüm ek [içerik](#streaming-more-content-as-it-loads) için geçerlidir. Response döndürmeden önce `awaitstream.allReady`yapabilirsiniz [crawlers ve statik üretim için.](#waiting-for-all-content-to-load-for-crawlers-and-static-generation) Eğer bunu yaparsanız, progressive loading almazsınız. Stream, final HTML’i içerir.
74
74
75
75
---
76
76
77
-
## Usage {/*usage*/}
77
+
## Kullanım {/*usage*/}
78
78
79
-
### Rendering a React tree as HTML to a Readable Web Stream {/*rendering-a-react-tree-as-html-to-a-readable-web-stream*/}
79
+
### React tree’ini HTML olarak bir Readable Web Stream içine render etmek {/*rendering-a-react-tree-as-html-to-a-readable-web-stream*/}
80
80
81
-
Call `renderToReadableStream` to render your React tree as HTML into a [Readable Web Stream:](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
81
+
React tree’nizi HTML olarak bir [Readable Web Stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) içine render etmek için `renderToReadableStream` fonksiyonunu çağırın.
@@ -93,9 +93,9 @@ async function handler(request) {
93
93
}
94
94
```
95
95
96
-
Along with the <CodeStep step={1}>root component</CodeStep>, you need to provide a list of <CodeStep step={2}>bootstrap `<script>`paths</CodeStep>. Your root component should return **the entire document including the root `<html>`tag.**
96
+
<CodeStep step={1}>Root component</CodeStep> ile birlikte bir <CodeStep step={2}>bootstrap `<script>`yolları</CodeStep> listesi sağlamanız gerekir.. Root component’iniz **tüm dokümanı, root `<html>`etiketi dahil olmak üzere** döndürmelidir.
0 commit comments