Skip to content

Translate reference/renderToPipeableStream page #195

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
18 changes: 9 additions & 9 deletions src/content/reference/react-dom/server/renderToPipeableStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: renderToPipeableStream

<Intro>

`renderToPipeableStream` renders a React tree to a pipeable [Node.js Stream.](https://nodejs.org/api/stream.html)
`renderToPipeableStream` একটি React tree কে একটি pipeable [Node.js Stream.](https://nodejs.org/api/stream.html) এ রেন্ডার করে।

```js
const { pipe, abort } = renderToPipeableStream(reactNode, options?)
Expand All @@ -16,17 +16,17 @@ const { pipe, abort } = renderToPipeableStream(reactNode, options?)

<Note>

This API is specific to Node.js. Environments with [Web Streams,](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) like Deno and modern edge runtimes, should use [`renderToReadableStream`](/reference/react-dom/server/renderToReadableStream) instead.
এই API শুধুমাত্র Node.js এর জন্য। [Web Streams,](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) এর মতো environment, যেমন Deno এবং আধুনিক Edge রানটাইমে, [`renderToReadableStream`](/reference/react-dom/server/renderToReadableStream) ব্যবহার করা উচিত।

</Note>

---

## Reference {/*reference*/}
## রেফারেন্স {/*reference*/}

### `renderToPipeableStream(reactNode, options?)` {/*rendertopipeablestream*/}

Call `renderToPipeableStream` to render your React tree as HTML into a [Node.js Stream.](https://nodejs.org/api/stream.html#writable-streams)
আপনার React tree কে একটি [Node.js Stream](https://nodejs.org/api/stream.html#writable-streams) এ HTML হিসেবে রেন্ডার করতে `renderToPipeableStream` কল করুন।

```js
import { renderToPipeableStream } from 'react-dom/server';
Expand All @@ -40,16 +40,16 @@ const { pipe } = renderToPipeableStream(<App />, {
});
```

On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to make the server-generated HTML interactive.
Client-side এ, server-generated HTML কে ইন্টার‍্যাক্টিভ করতে [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) কল করুন।

[See more examples below.](#usage)
[নিচে আরও উদাহরণ দেখুন।](#usage)

#### Parameters {/*parameters*/}

* `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.
* `reactNode`: একটি React node যেটিকে আপনি HTML এ রেন্ডার করতে চান। উদাহরণস্বরূপ, `<App />` এর মতো একটি JSX element । এটা এক্সপেক্টেড যে, এটি পুরো document কে ধারণ করবে, তাই `App` কম্পোনেটটির `<html>` ট্যাগ রেন্ডার করার কথা।

* **optional** `options`: An object with streaming options.
* **optional** `bootstrapScriptContent`: If specified, this string will be placed in an inline `<script>` tag.
* **optional** `options`: একটি object যাতে streaming options থাকবে।
* **optional** `bootstrapScriptContent`: যদি প্রদান করা হয়, তাহলে এই string টি একটি inline `<script>` tag এ থাকবে।
* **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.
* **optional** `bootstrapModules`: Like `bootstrapScripts`, but emits [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) instead.
* **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)
Expand Down