diff --git a/src/content/reference/react-dom/client/hydrateRoot.md b/src/content/reference/react-dom/client/hydrateRoot.md index c875560da..e6b7ece97 100644 --- a/src/content/reference/react-dom/client/hydrateRoot.md +++ b/src/content/reference/react-dom/client/hydrateRoot.md @@ -4,7 +4,7 @@ title: hydrateRoot -`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) +`hydrateRoot` আপনাকে একটা ব্রাউজার DOM এর মধ্যে সেই React কম্পোনেন্ট গুলো দেখানোর সুযোগ দেয়, যা [`react-dom/server`](/reference/react-dom/server) আগে থেকেই তৈরি করে রেখছে। ```js const root = hydrateRoot(domNode, reactNode, options?) @@ -20,7 +20,7 @@ const root = hydrateRoot(domNode, reactNode, options?) ### `hydrateRoot(domNode, reactNode, options?)` {/*hydrateroot*/} -Call `hydrateRoot` to “attach” React to existing HTML that was already rendered by React in a server environment. +একটা সার্ভার এনভায়রনমেন্টে React এর ইতোমধ্যে রেন্ডার করা HTML এর সাথে React "যুক্ত" করতে `hydrateRoot` কল করুন। ```js import { hydrateRoot } from 'react-dom/client'; @@ -29,99 +29,99 @@ const domNode = document.getElementById('root'); const root = hydrateRoot(domNode, reactNode); ``` -React will attach to the HTML that exists inside the `domNode`, and take over managing the DOM inside it. An app fully built with React will usually only have one `hydrateRoot` call with its root component. +`domNode` এর ভেতরে থাকা HTML এর সাথে React যুক্ত হয়ে যাবে, এবং এর ভেতরে থাকা DOM পরিচালনার দায়িত্ব নিয়ে নিবে। সম্পূর্ণরূপে React দিয়ে বানানো একটি অ্যাপে সাধারণত এর রুট কম্পোনেন্টের সাথে একটি মাত্র `hydrateRoot` কল থাকে। -[See more examples below.](#usage) +[এখানে আরো উদাহরণ দেখুন](#usage) -#### Parameters {/*parameters*/} +#### প্যারামিটার {/*parameters*/} -* `domNode`: A [DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that was rendered as the root element on the server. +* `domNode`: একটা [DOM এলিমেন্ট](https://developer.mozilla.org/en-US/docs/Web/API/Element) যা সার্ভারে রুট এলিমেন্ট হিসেবে রেন্ডার হয়েছিল। -* `reactNode`: The "React node" used to render the existing HTML. This will usually be a piece of JSX like `` which was rendered with a `ReactDOM Server` method such as `renderToPipeableStream()`. +* `reactNode`: বিদ্যমান HTML রেন্ডার করার জন্য যে "React নোড" ব্যবহৃত হয়। এটা সাধারণত `` এর মত একটি JSX এর অংশ হয়, যা `renderToPipeableStream()` এর মত একটি `ReactDOM Server` মেথড ব্যবহার করে রেন্ডার করা হয়েছে। -* **optional** `options`: An object with options for this React root. +* **optional** `options`: এই React root এর জন্য বিভিন্ন option সংবলিত একটি অবজেক্ট। - * **optional** `onRecoverableError`: Callback called when React automatically recovers from errors. - * **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 used on the server. + * **optional** `onRecoverableError`: যখন React স্বয়ংক্রিয় ভাবে কোন error থেকে নিজেকে recover করে তখন হওয়া কলব্যাক। + * **optional** `identifierPrefix`: [`useId`](/reference/react/useId) দিয়ে তৈরী হওয়া ID গুলোর জন্য React যে string prefix ব্যবহার করে। একই পেইজে যখন একাধিক rot থাকে তখন conflict এড়াতে এটা কাজে লাগে। -#### Returns {/*returns*/} +#### রিটার্ন {/*returns*/} -`hydrateRoot` returns an object with two methods: [`render`](#root-render) and [`unmount`.](#root-unmount) +`hydrateRoot` দুটি মেথডসহ একটি অব্জেক্ট রিটার্ন করেঃ [`render`](#root-render) এবং [`unmount`.](#root-unmount) -#### Caveats {/*caveats*/} +#### সতর্কতা {/*caveats*/} -* `hydrateRoot()` expects the rendered content to be identical with the server-rendered content. You should treat mismatches as bugs and fix them. -* In development mode, React warns about mismatches during hydration. There are no guarantees that attribute differences will be patched up in case of mismatches. This is important for performance reasons because in most apps, mismatches are rare, and so validating all markup would be prohibitively expensive. -* You'll likely have only one `hydrateRoot` call in your app. If you use a framework, it might do this call for you. -* If your app is client-rendered with no HTML rendered already, using `hydrateRoot()` is not supported. Use [`createRoot()`](/reference/react-dom/client/createRoot) instead. +* `hydrateRoot()` প্রত্যাশা করে যে রেন্ডার হওয়া কন্টেন্ট সার্ভারে রেন্ডার হওয়া কম্পোনেন্টের সাথে হুবহু মিলে যাবে। যদি অমিল পান, তাহলে সেটাকে বাগ হিসেবে ধরে নিয়ে ঠিক করে ফেলুন। +* ্ডেভেলপমেন্ট মোডে থাকা অবস্থায়, hydration চলাকালীন React অমিলের বিষয়ে সতর্ক করে। এমন কোন নিশ্চয়তা নাই যে অমিলের ক্ষেত্রে এট্রিবিউটের ভিন্নতা patch up হয়ে যাবে। এটা পারফরম্যান্স ঠিক রাখতে জরুরী। কারণ বেশিরভাগ অ্যাপে, অমিল থাকেই না বলা যায়, তাই সব markup ঠিকঠাক আছে কি না দেখা খুব কষ্টসাধ্য হয়। +* আপনার অ্যাপে খুব সম্ভবতঃ একটি মাত্র `hydrateRoot` কল থাকবে। আপনি যদি একটি ফ্রেমওয়ার্ক ব্যবহার করেন, সেটা আপনার জন্য কলটা করে দিতে পারে। +* যদি আপনার অ্যাপ ক্লায়েন্ট সাইডে রেন্ডার করা হয় যেখানে ইতোমধ্যে কোন HTML রেন্ডার করা নেই, সেক্ষেত্রে `hydrateRoot()` ব্যবহার করা যাবে না। বরং [`createRoot()`](/reference/react-dom/client/createRoot) ব্যবহার করুন। --- ### `root.render(reactNode)` {/*root-render*/} -Call `root.render` to update a React component inside a hydrated React root for a browser DOM element. +একটি ব্রাউজার DOM এলিমেন্টের জন্য hydrated React রুটের মধ্যকার একটি React কম্পোনেন্ট আপডেট করতে `root.render` কল করুন। ```js root.render(); ``` -React will update `` in the hydrated `root`. +React hydrated `root` এর ভেতরে থাকা `` আপডেট করবে। -[See more examples below.](#usage) +[নিচে আরো উদাহরণ দেখুন](#usage) -#### Parameters {/*root-render-parameters*/} +#### প্যারামিটার {/*root-render-parameters*/} -* `reactNode`: A "React node" that you want to update. This will usually be a piece of JSX like ``, but you can also pass a React element constructed with [`createElement()`](/reference/react/createElement), a string, a number, `null`, or `undefined`. +* `reactNode`: এটা হচ্ছে এমন একটি "React নোড" যা আপনি আপডেট করতে চান। এটা সাধারণত `` এর মত একটি JSX এর অংশ হয়ে থাকে, তবে আপনি [`createElement()`](/reference/react/createElement) দিয়ে বানানো একটি React এলিমেন্ট, একটি স্ট্রিং, একটি সংখ্যা, `null` বা `undefined` পাস করে দিতে পারেন। -#### Returns {/*root-render-returns*/} +#### রিটার্ন {/*root-render-returns*/} -`root.render` returns `undefined`. +`root.render` `undefined` রিটার্ন করে। -#### Caveats {/*root-render-caveats*/} +#### সতর্কতা {/*root-render-caveats*/} -* If you call `root.render` before the root has finished hydrating, React will clear the existing server-rendered HTML content and switch the entire root to client rendering. +* রুটের hydrating শেষ হবার আগে আপনি যদি `root.render` কল করেন, তাহলে React সার্ভার-রেন্ডার্ড HTML মুছে ফেলবে এবং সম্পূর্ণ রুটটাকে ক্লায়েন্ট রেন্ডারিং এর জন্য তৈরী করে ফেলবে। --- ### `root.unmount()` {/*root-unmount*/} -Call `root.unmount` to destroy a rendered tree inside a React root. +একটি React রুটের মধ্যে রেন্ডার হওয়া একটি ট্রি মুছে ফেলতে `root.unmount` কল করুন। ```js root.unmount(); ``` -An app fully built with React will usually not have any calls to `root.unmount`. +সম্পূর্ণরূপে React দিয়ে বানানো একটি অ্যাপের সাধারণত `root.unmount` এ কোন কল থাকবে না। -This is mostly useful if your React root's DOM node (or any of its ancestors) may get removed from the DOM by some other code. For example, imagine a jQuery tab panel that removes inactive tabs from the DOM. If a tab gets removed, everything inside it (including the React roots inside) would get removed from the DOM as well. You need to tell React to "stop" managing the removed root's content by calling `root.unmount`. Otherwise, the components inside the removed root won't clean up and free up resources like subscriptions. +এটা তখন সবচেয়ে কাজে লাগে যদি আপনার React রুটের DOM নোড (বা এর কোন ancestor) অন্য কোন কোডের কারণে DOM থেকে মুছে যায়। উদাহরণস্বরূপ, ধরে একটা jQuery ট্যাব প্যানেল আছে যা DOM থেকে অচল ট্যাবগুলো মুছে ফেলে। যদি একটা ট্যাব মুছে যায় তবে এর ভেতর থাকা সব কিছুও (ভিতরে থাকা React রুটগুলো সহ) DOM থেকে মুছে যাবে। সেক্ষেত্রে, `root.unmount` কল করার মাধ্যমে আপনার React কে বলতে হবে মুছে যাওয়া রুটের কনটেন্ট ম্যানেজ করা "বন্ধ" করতে। না হলে, মুছে যাওয়া রুটের ভেতরকার কম্পোনেন্ট সাবস্ক্রিপশনের মত global resource মুছবে না এবং সেগুলো ফ্রি হবে না। -Calling `root.unmount` will unmount all the components in the root and "detach" React from the root DOM node, including removing any event handlers or state in the tree. +`root.unmount` কল করলে রুটের সব কম্পোনেন্ট আনমাউন্ট হবে এবং রুট DOM নোড থেকে React "detach" হয়ে যাবে। একই সাথে ট্রিতে কোন ইভেন্ট হ্যান্ডলার বা স্টেট থাকলে সেটাও মুছে যাবে। -#### Parameters {/*root-unmount-parameters*/} +#### প্যারামিটার {/*root-unmount-parameters*/} `root.unmount` does not accept any parameters. -#### Returns {/*root-unmount-returns*/} +#### রিটার্ন {/*root-unmount-returns*/} -`render` returns `null`. +`render` `null` রিটার্ন করে। -#### Caveats {/*root-unmount-caveats*/} +#### সতর্কতা {/*root-unmount-caveats*/} -* Calling `root.unmount` will unmount all the components in the tree and "detach" React from the root DOM node. +* `root.unmount` কল করলে ট্রি-এর সকল কম্পোনেন্ট আনমাউন্ট হবে এবং React কে রুট DOM নোড থেকে "বিচ্ছিন্ন" করবে। -* Once you call `root.unmount` you cannot call `root.render` again on the root. Attempting to call `root.render` on an unmounted root will throw a "Cannot update an unmounted root" error. +* একবার `root.unmount` কল করা হলে একই রুটে `root.render` আর কল করা যাবে না। আনমাউন্ট করা রুটে `root.render` কলের চেষ্টা করা হলে "Cannot update an unmounted root" এরর দেখাবে। --- -## Usage {/*usage*/} +## ব্যবহার {/*usage*/} -### Hydrating server-rendered HTML {/*hydrating-server-rendered-html*/} +### সার্ভার-রেন্ডার্ড HTML এর hydrating {/*hydrating-server-rendered-html*/} -If your app's HTML was generated by [`react-dom/server`](/reference/react-dom/client/createRoot), you need to *hydrate* it on the client. +আপনার অ্যাপের HTML যদি [`react-dom/server`](/reference/react-dom/client/createRoot) দিয়ে বানানো হয়ে থাকে, আপনাকে একে ক্লায়েন্টে *hydrate* করতে হবে। ```js [[1, 3, "document.getElementById('root')"], [2, 3, ""]] import { hydrateRoot } from 'react-dom/client'; @@ -129,16 +129,16 @@ import { hydrateRoot } from 'react-dom/client'; hydrateRoot(document.getElementById('root'), ); ```` -This will hydrate the server HTML inside the browser DOM node with the React component for your app. Usually, you will do it once at startup. If you use a framework, it might do this behind the scenes for you. +এটা আপনার অ্যাপের জন্য React কম্পোনেন্ট দিয়ে ব্রাউজার DOM নোডের ভিতরকার সার্ভার HTML hydrate করে দেবে। সাধারণত, এটা আপনি startup এর সময় একবার করবেন। আপনি যদি একটি ফ্রেমওয়ার্ক ব্যবহার করেন, সে আপনার হয়ে ভেতরে ভেতরে কাজটা করে দেবে। -To hydrate your app, React will "attach" your components' logic to the initial generated HTML from the server. Hydration turns the initial HTML snapshot from the server into a fully interactive app that runs in the browser. +আপনার অ্যাপ hydrate করতে, React প্রাথমিকভাবে সার্ভারে তৈরী হওয়া HTML এর সাথে আপনার কম্পোনেন্টগুলোর লজিক "যুক্ত" করে দেবে। Hydration সার্ভার থেকে হওয়া প্রাথমিক HTML স্ন্যাপশটকে সম্পূর্ণভাবে interactive একটা অ্যাপে রূপান্তরিত করে যা ব্রাউজারে চলতে পারে। ```html public/index.html

Hello, world!

``` @@ -178,30 +178,30 @@ function Counter() {
-You shouldn't need to call `hydrateRoot` again or to call it in more places. From this point on, React will be managing the DOM of your application. To update the UI, your components will [use state](/reference/react/useState) instead. +আপনার `hydrateRoot` আবার বা একাধিক জায়গায় কল করার প্রয়োজন হবার কথা না। এর পর থেকে React আপনার অ্যাপ্লিকেশনের DOM ম্যানেজ করবে। UI আপডেটের জন্য আপনার কম্পোনেন্ট বরং [state ব্যবহার](/reference/react/useState) করবে। -The React tree you pass to `hydrateRoot` needs to produce **the same output** as it did on the server. +এটা জরুরি যে আপনি `hydrateRoot` এ যে React ট্রি পাস করছেন সেটা সার্ভারে যেমন আউটপুট দিয়েছিল **ঠিক হুবহু আউটপুট** দিবে। -This is important for the user experience. The user will spend some time looking at the server-generated HTML before your JavaScript code loads. Server rendering creates an illusion that the app loads faster by showing the HTML snapshot of its output. Suddenly showing different content breaks that illusion. This is why the server render output must match the initial render output on the client. +এটা ব্যবহারকারীর অভিজ্ঞতার জন্য জরুরী। আপনার জাভাস্ক্রিপ্ট কোড লোড হবার আগে ব্যবহারকারী কিছুক্ষণ সার্ভার থেকে রেন্ডার হওয়া HTML দেখবে। সার্ভারে হওয়া HTML স্ন্যাপশটের যে আউটপুট সেটার রেন্ডারিং অ্যাপ দ্রুত লোড হবার একটা ভ্রম তৈরী করছে। হঠাৎ করে অন্য কিছু দেখালে সেই ভ্রমটা ভেঙে যায়। এইজন্য সার্ভার আর ক্লায়েন্টে প্রাথমিকভাবে হওয়া রেন্ডার একইরকম হতে হবে। -The most common causes leading to hydration errors include: +যেসব কারণে সবচেয়ে hydration এরর সবচেয়ে বেশি দেখা যায় তার মধ্যে অন্যতম হলঃ -* Extra whitespace (like newlines) around the React-generated HTML inside the root node. -* Using checks like `typeof window !== 'undefined'` in your rendering logic. -* Using browser-only APIs like [`window.matchMedia`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) in your rendering logic. -* Rendering different data on the server and the client. +* রুট নোডের মধ্যে থাকা React এর বানানো HTML এর আশে পাশে থাকা অতিরিক্ত whitespace (যেমন newline)। +* রেন্ডারিং লজিকে `typeof window !== 'undefined'` এর মত চেক ব্যবহার করা। +* আপনার রেন্ডারিং লজিকে [`window.matchMedia`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) এর মত browser-only API এর ব্যবহার। +* সার্ভার আর ক্লায়েন্টে ভিন্ন ডেটা রেন্ডার করা। -React recovers from some hydration errors, but **you must fix them like other bugs.** In the best case, they'll lead to a slowdown; in the worst case, event handlers can get attached to the wrong elements. +React কিছু hydration এরর থেকে সামলে ওঠে, কিন্তু **আপনাকে অবশ্যই এগুলোকে অন্যান্য বাগের মতই ঠিক করতে হবে।** যদি সব ঠিকঠাক থাকেও, এরা আপনার অ্যাপ ধীরগতির করে ফেলবে; আর সবচেয়ে খারাপ যেটা হতে পারে, ইভেন্ট হ্যান্ডলার ভুল এলিমেন্টে যুক্ত হয়ে যেতে পারে। --- -### Hydrating an entire document {/*hydrating-an-entire-document*/} +### একটি সম্পূর্ণ ডকুমেন্টের hydrating {/*hydrating-an-entire-document*/} -Apps fully built with React can render the entire document as JSX, including the [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html) tag: +সম্পূর্ণরূপে React দিয়ে বানানো একটি অ্যাপ [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html) ট্যাগসহ পুরো ডকুমেন্ট JSX হিসেবে রেন্ডার করতে পারেঃ ```js {3,13} function App() { @@ -221,7 +221,7 @@ function App() { } ``` -To hydrate the entire document, pass the [`document`](https://developer.mozilla.org/en-US/docs/Web/API/Window/document) global as the first argument to `hydrateRoot`: +সম্পূর্ণ ডকুমেন্ট hydrate করতে, `hydrateRoot` এ [`document`](https://developer.mozilla.org/en-US/docs/Web/API/Window/document) global প্রথম আর্গুমেন্ট হিসেবে পাস করে দিনঃ ```js {4} import { hydrateRoot } from 'react-dom/client'; @@ -232,18 +232,18 @@ hydrateRoot(document, ); --- -### Suppressing unavoidable hydration mismatch errors {/*suppressing-unavoidable-hydration-mismatch-errors*/} +### অনিবার্য hydrartion অমিলের এরর বন্ধ করবেন যেভাবে {/*suppressing-unavoidable-hydration-mismatch-errors*/} -If a single element’s attribute or text content is unavoidably different between the server and the client (for example, a timestamp), you may silence the hydration mismatch warning. +যদি একটিমাত্র এলিমেন্টের এট্রিবিউট বা টেক্সট কনটেন্ট সার্ভার এবং ক্লায়েন্টে আবশ্যিকভাবে আলাদা রাখা দরকার হয়, যেমন একতা টাইমস্ট্যাম্প, তাহলে আপনি hydration অমিল হবার কারণে যে সতর্কতা বার্তা দেখায় তা বন্ধ করতে পারেন। -To silence hydration warnings on an element, add `suppressHydrationWarning={true}`: +একটা এলিমেন্টে hydration বিষয়ক সতর্কতা বার্তা দেখানো বন্ধ করতে চাইলে, `suppressHydrationWarning={true}` যুক্ত করুনঃ ```html public/index.html

Current Date: 01/01/2020

``` @@ -268,20 +268,20 @@ export default function App() {
-This only works one level deep, and is intended to be an escape hatch. Don’t overuse it. Unless it’s text content, React still won’t attempt to patch it up, so it may remain inconsistent until future updates. +এটা শুধুমাত্র এক স্তর গভীরে কাজ করে, এবং এর উদ্দেশ্য একটা escape hatch এর মত কাজ করা। এর অতিরিক্ত ব্যবহার এড়িয়ে চলুন। যদি না এটা টেক্সট কনটেন্ট হয়, React একে প্যাচ আপ করার চেষ্টা করবে না, সুতরাং এটা ভবিষ্যতে আপডেট হবার আগ পর্যন্ত অসামাঞ্জস্যপূর্ন থাকতে পারে। --- -### Handling different client and server content {/*handling-different-client-and-server-content*/} +### ক্লায়েন্ট এবং সার্ভারে ভিন্ন কনটেন্ট পরিচালনা করতে হবে যেভাবে {/*handling-different-client-and-server-content*/} -If you intentionally need to render something different on the server and the client, you can do a two-pass rendering. Components that render something different on the client can read a [state variable](/reference/react/useState) like `isClient`, which you can set to `true` in an [Effect](/reference/react/useEffect): +আপনি যদি ইচ্ছাকৃতভাবে সার্ভার এবং ক্লায়েন্টে ভিন্ন কিছু রেন্ডার করতে চান, আপনি দুই পাসে রেন্ডারিং চালাতে পারেন। ক্লায়েন্টের যেসব কম্পোনেন্ট কিছুটা ভিন্ন ভাবে রেন্ডার করবে, তারা `isClient` এর মত একটি [state variable](/reference/react/useState) রিড করতে পারে, যেটা আপনি একটা [Effect](/reference/react/useEffect) এ `true` সেট করে দিতে পারেনঃ ```html public/index.html

Is Server

``` @@ -314,28 +314,28 @@ export default function App() {
-This way the initial render pass will render the same content as the server, avoiding mismatches, but an additional pass will happen synchronously right after hydration. +এই ভাবে প্রাথমিক রেন্ডার পাস সার্ভারের মত একই কনটেন্ট রেন্ডার করবে, অমিল এড়িয়ে গিয়ে, কিন্তু hydration এর ঠিক পর সিংক্রোনাসভাবে অতিরিক্ত একটি পাস হবে। -This approach makes hydration slower because your components have to render twice. Be mindful of the user experience on slow connections. The JavaScript code may load significantly later than the initial HTML render, so rendering a different UI immediately after hydration may also feel jarring to the user. +এই পন্থায় hydration ধীর হয়ে যায় কারণ আপনার কম্পোনেন্ট দুই বার রেন্ডার হয়। যেসব ব্যবহারকারীর ইন্টারনেট ধীর গতির তাদের এটা ব্যবহারের অভিজ্ঞতার দিকে খেয়াল রাখবেন। প্রাথমিক HTML এর চেয়ে জাভাস্ক্রিপ্ট উল্লেখজনক ভাবে ধীরে লোড হতে পারে, সুতরাং hydration এর পর পর অন্য কোন UI রেন্ডার করা ব্যবহারকারীর জন্য বিরক্তিকর হতে পারে। --- -### Updating a hydrated root component {/*updating-a-hydrated-root-component*/} +### একটি hydrated root কম্পোনেন্টের আপডেট যেভাবে করা হয় {/*updating-a-hydrated-root-component*/} -After the root has finished hydrating, you can call [`root.render`](#root-render) to update the root React component. **Unlike with [`createRoot`](/reference/react-dom/client/createRoot), you don't usually need to do this because the initial content was already rendered as HTML.** +রুটের hydrating শেষ হবার পরে, রুট React কম্পোনেন্ট আপডেট করার জন্য আপনি [`root.render`](#root-render) কল করতে পারেন। **[`createRoot`](/reference/react-dom/client/createRoot) এর সাথে অমিল এখানে যে, এখানে আপনাকে আসলে এটা করবার দরকার নেই, কারণ ইতোমধ্যেই প্রাথমিক কনটেন্ট HTML হিসেবে রেন্ডার করা হয়ে গেছে।** -If you call `root.render` at some point after hydration, and the component tree structure matches up with what was previously rendered, React will [preserve the state.](/learn/preserving-and-resetting-state) Notice how you can type in the input, which means that the updates from repeated `render` calls every second in this example are not destructive: +Hydration এর পরে কোন এক সময়ে যদি আপনি `root.render` কল করেন, এবং আগের বার তৈরি হওয়া ট্রির সাথে নতুন কম্পোনেন্ট ট্রির গঠন কাঠামো মিলে যায়, React [state সংরক্ষণ করবে।](/learn/preserving-and-resetting-state) খেয়াল করুন যে আপনি ইনপুটে টাই করে পারছেন, যার অর্থ এই উদাহরণে প্রতি সেকেন্ডে বার বার হওয়া `render` কল ধ্বংসাত্মক নাঃ ```html public/index.html

Hello, world! 0

``` @@ -370,4 +370,4 @@ export default function App({counter}) {
-It is uncommon to call [`root.render`](#root-render) on a hydrated root. Usually, you'll [update state](/reference/react/useState) inside one of the components instead. +একটা hydrated রুটে [`root.render`](#root-render) কল করার বিষয়টা বিরল। সাধারণত, আপনি এর বদলে কম্পোনেন্টগুলোর কোন একটির মধ্যে [state আপডেট](/reference/react/useState) করবেন।