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/useSyncExternalStore.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,16 +79,16 @@ function TodosApp() {
79
79
80
80
---
81
81
82
-
## Usage {/*usage*/}
82
+
### ব্যবহার {/*usage*/}
83
83
84
-
### Subscribing to an external store {/*subscribing-to-an-external-store*/}
84
+
### এক্সটার্নাল স্টোরে সাবস্ক্রাইব করা {/*subscribing-to-an-external-store*/}
85
85
86
-
Most of your React components will only read data from their [props,](/learn/passing-props-to-a-component) [state,](/reference/react/useState) and [context.](/reference/react/useContext) However, sometimes a component needs to read some data from some store outside of React that changes over time. This includes:
86
+
আপনার বেশিরভাগ রিয়েক্ট কম্পোনেন্ট শুধুমাত্র তাদের [props,](/learn/passing-props-to-a-component) [state,](/reference/react/useState) এবং [context](/reference/react/useContext) থেকে ডেটা রিড করবে। তবে, মাঝে মাঝে এমন কোনো রিয়েক্ট কম্পোনেন্টের প্রয়োজন হতে পারে রিয়েক্টের বাইরে কোনো এক্সটার্নাল স্টোর থেকে ডেটা রিড করার — যা সময়ের সাথে সাথে পরিবর্তিত হয়। এর মধ্যে রয়েছে:
87
87
88
-
* Third-party state management libraries that hold state outside of React.
89
-
* Browser APIs that expose a mutable value and events to subscribe to its changes.
88
+
* থার্ড-পার্টি স্টেট ম্যানেজমেন্ট লাইব্রেরি যা রিয়েক্টের বাইরে স্টেট ধরে রাখে।
89
+
* ব্রাউজার API যা মিউটেবল ভ্যালু প্রকাশ করে এবং এর পরিবর্তনে সাবস্ক্রাইব করার জন্য ইভেন্ট সরবরাহ করে।
90
90
91
-
Call `useSyncExternalStore` at the top level of your component to read a value from an external data store.
91
+
একটি এক্সটার্নাল ডেটা স্টোর থেকে ভ্যালু রিড করতে আপনার কম্পোনেন্টের টপ লেভেলে `useSyncExternalStore` কল করুন।
It returns the <CodeStep step={3}>snapshot</CodeStep> of the data in the store. You need to pass two functions as arguments:
103
+
এটি স্টোরে থাকা ডেটার <CodeStep step={3}>স্ন্যাপশট (snapshot)</CodeStep> রিটার্ন করে। আপনাকে এর আর্গুমেন্ট হিসেবে দুটি ফাংশন পাস করতে হবে:
104
104
105
-
1. The <CodeStep step={1}>`subscribe`function</CodeStep> should subscribe to the store and return a function that unsubscribes.
106
-
2. The <CodeStep step={2}>`getSnapshot`function</CodeStep> should read a snapshot of the data from the store.
105
+
1. <CodeStep step={1}>`subscribe`ফাংশনটি</CodeStep> স্টোরে সাবস্ক্রাইব করবে এবং এমন একটি ফাংশন রিটার্ন করবে যা এই সাবস্ক্রিপশনটি আনসাবস্ক্রাইব করে।
106
+
2. <CodeStep step={2}>`getSnapshot`ফাংশনটি</CodeStep> স্টোর থেকে ডেটার স্ন্যাপশট রিড করবে।
107
107
108
-
React will use these functions to keep your component subscribed to the store and re-render it on changes.
108
+
রিয়েক্ট এই ফাংশনগুলি ব্যবহার করবে আপনার কম্পোনেন্টটিকে স্টোরে সাবস্ক্রাইব করে রাখার জন্য এবং কোনো পরিবর্তন এলে সেটিকে রি-রেন্ডার করার জন্য।
109
109
110
-
For example, in the sandbox below, `todosStore`is implemented as an external store that stores data outside of React. The `TodosApp`component connects to that external store with the `useSyncExternalStore`Hook.
110
+
উদাহরণস্বরূপ, নিচের স্যান্ডবক্সে, `todosStore`কে এমন একটি এক্সটার্নাল স্টোর হিসেবে ইমপ্লিমেন্ট করা হয়েছে যা রিয়েক্টের বাইরে ডেটা স্টোর করে। `TodosApp`কম্পোনেন্টটি ঐ এক্সটার্নাল স্টোরের সাথে `useSyncExternalStore`হুক দিয়ে সংযুক্ত।
111
111
112
112
<Sandpack>
113
113
@@ -169,7 +169,7 @@ function emitChange() {
169
169
170
170
<Note>
171
171
172
-
When possible, we recommend using built-in React state with [`useState`](/reference/react/useState) and [`useReducer`](/reference/react/useReducer) instead. The `useSyncExternalStore` API is mostly useful if you need to integrate with existing non-React code.
172
+
যখন সম্ভব হবে, আমরা এর বদলে রিয়েক্টের বিল্ট-ইন স্টেট [`useState`](/reference/react/useState) এবং [`useReducer`](/reference/react/useReducer) ব্যবহারের পরামর্শ দিই। `useSyncExternalStore` API বেশিরভাগ তখনই উপকারী যখন আপনাকে বিদ্যমান নন-রিয়েক্ট কোডের সাথে ইন্টিগ্রেট করতে হবে।
0 commit comments