Skip to content

Commit f64bbdc

Browse files
committed
renderToReadableStream.md
1 parent 38c4c3e commit f64bbdc

1 file changed

Lines changed: 11 additions & 38 deletions

File tree

‎src/content/reference/react-dom/server/renderToReadableStream.md‎

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,16 @@ Client tarafında, server tarafından oluşturulan HTML’i interaktif hale geti
4949
5050
* `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.
5151
52-
<<<<<<< HEAD
53-
* **opsiyonel** `options`: Stream için yapılandırma seçeneklerini içeren bir obje.
54-
* **opsiyonel** `bootstrapScriptContent`: Belirtilirse, bu string inline bir `<script>` etiketi içinde yer alır.
55-
* **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.
56-
* **opsiyonel** `bootstrapModules`: `bootstrapScripts` gibi, ancak [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) olarak emit eder.
57-
* **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.
58-
* **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.
59-
* **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.
60-
* **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.
61-
* **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)
62-
* **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.
63-
=======
64-
* **optional** `options`: An object with streaming options.
65-
* **optional** `bootstrapScriptContent`: If specified, this string will be placed in an inline `<script>` tag.
66-
* **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.
67-
* **optional** `bootstrapModules`: Like `bootstrapScripts`, but emits [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) instead.
68-
* **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)
69-
* **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.
70-
* **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).
71-
* **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.
72-
* **optional** `progressiveChunkSize`: The number of bytes in a chunk. [Read more about the default heuristic.](https://github.com/react/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
73-
* **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.
74-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
52+
* **optional** `options`: Streaming options içeren bir object.
53+
* **optional** `bootstrapScriptContent`: Belirtilirse, bu string inline bir `<script>` tag’i içine yerleştirilir.
54+
* **optional** `bootstrapScripts`: Sayfada emit edilecek `<script>` tag’leri için string URL’lerden oluşan bir array. [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) çağıran `<script>`’i dahil etmek için bunu kullanın. Client tarafında React’i hiç çalıştırmak istemiyorsanız bunu atlayın.
55+
* **optional** `bootstrapModules`: `bootstrapScripts` gibidir, ancak bunun yerine [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) emit eder.
56+
* **optional** `identifierPrefix`: React’in [`useId`](/reference/react/useId) tarafından oluşturulan ID’ler için kullandığı string prefix. Aynı sayfada birden fazla root kullanırken conflict’leri önlemek için kullanışlıdır. [`hydrateRoot`](/reference/react-dom/client/hydrateRoot#parameters)’a geçirilen prefix ile aynı olmalıdır.
57+
* **optional** `namespaceURI`: Stream için root [namespace URI](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#important_namespace_uris)’sini içeren bir string. Default olarak normal HTML’dir. SVG için `'http://www.w3.org/2000/svg'`, MathML için `'http://www.w3.org/1998/Math/MathML'` geçirin.
58+
* **optional** `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 veren bir [`nonce`](http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#nonce) string’i.
59+
* **optional** `onError`: [Recoverable](#recovering-from-errors-outside-the-shell) olsun ya da [olmasın](#recovering-from-errors-inside-the-shell), server error olduğunda tetiklenen bir callback. Default olarak yalnızca `console.error` çağırır. [Crash report’ları loglamak](#logging-crashes-on-the-server) için override ederseniz, yine de `console.error` çağırdığınızdan emin olun. Shell emit edilmeden önce [status code’u ayarlamak](#setting-the-status-code) için de kullanabilirsiniz.
60+
* **optional** `progressiveChunkSize`: Bir chunk içindeki byte sayısı. [Default heuristic hakkında daha fazla okuyun.](https://github.com/react/react/blob/14c2be8dac2d5482fda8a0906a31d239df8551fc/packages/react-server/src/ReactFizzServer.js#L210-L225)
61+
* **optional** `signal`: [Server rendering’i abort etmek](#aborting-server-rendering) ve geri kalanını client’ta render etmek için kullanabileceğiniz bir [abort signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).
7562
7663
7764
#### Returns {/*returns*/}
@@ -296,21 +283,7 @@ Streaming, React’in browser’da yüklenmesini veya uygulamanızın interaktif
296283
297284
<Note>
298285
299-
<<<<<<< HEAD
300-
**Sadece Suspense destekli veri kaynakları, Suspense component’ini aktif hale getirir.** Bunlar şunları içerir:
301-
302-
- [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/) ve [Next.js](https://nextjs.org/docs/getting-started/react-essentials) gibi Suspense destekli framework’lerle veri çekme
303-
- [`lazy`](/reference/react/lazy) ile component kodlarını lazy-load etme
304-
- [`use`](/reference/react/use) ile bir Promise’in değerini okuma
305-
306-
Suspense, bir Effect veya event handler içinde veri çekildiğinde **bunu algılamaz**.
307-
308-
Yukarıdaki `Posts` component’inde veriyi nasıl yükleyeceğiniz kullandığınız framework’e bağlıdır. Eğer Suspense destekli bir framework kullanıyorsanız, detaylar veri çekme dokümantasyonunda bulunabilir.
309-
310-
Opinionated bir framework kullanmadan Suspense-enabled data fetching henüz desteklenmemektedir. Suspense-enabled bir data source implement etmek için gereken requirement’lar unstable ve undocumented durumdadır. Data source’ları Suspense ile integrate etmek için resmi bir API, React’in gelecekteki bir version’ında yayınlanacaktır.
311-
=======
312-
Only data read from a source that [activates a Suspense boundary](/reference/react/Suspense#what-activates-a-suspense-boundary), such as a Promise read with [`use`](/reference/react/use), will suspend during rendering. Suspense does not detect data fetched inside an Effect or event handler.
313-
>>>>>>> c7d6b700038c63d1aaf2c649af1aefe01ebbacac
286+
Yalnızca [`use`](/reference/react/use) ile okunan bir Promise gibi, [Suspense boundary’yi aktive eden](/reference/react/Suspense#what-activates-a-suspense-boundary) bir kaynaktan okunan data rendering sırasında suspend olur. Suspense, bir Effect veya event handler içinde fetch edilen data’yı detect etmez.
314287
315288
</Note>
316289

0 commit comments

Comments
 (0)