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
*`load`: A function that returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)or another *thenable* (a Promise-like object with a `then` method). React will not call `load` until the first time you attempt to render the returned component. After React first calls`load`, it will wait for it to resolve, and then render the resolved value as a React component. Both the returned Promise and the Promise's resolved value will be cached, so React will not call `load`more than once. If the Promise rejects, React will `throw`the rejection reason for the nearest Error Boundary to handle.
35
+
* `load`: একটি ফাংশন যা একটি [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) অথবা অন্য কোন *thenable* (`then` মেথড সহ একটি Promise-like অবজেক্ট) রিটার্ন করে। আপনি যতক্ষণ রিটার্ন হওয়া component লোড করার চেষ্টা করছেন ততক্ষণ React `load` কল করবে না। React প্রথম বার `load` কল করার পর, এটা resolved হবার অপেক্ষা করবে, এবং এর পরে resolved value React component হিসেবে রেন্ডার করবে। রিটার্ন হওয়া Promise এবং Promise এর resolved value cached হয়ে থাকবে, সুতরাং React একবারের বেশি `load` কল করবে না। যদি Promise reject করে, React rejection এর কারণ `throw` করবে যেন সবচেয়ে নিকটবর্তী error boundary সেটা হ্যান্ডেল করে।
36
36
37
-
#### Returns {/*returns*/}
37
+
#### রিটার্ন {/*returns*/}
38
38
39
-
`lazy`returns a React component you can render in your tree. While the code for the lazy component is still loading, attempting to render it will *suspend.* Use [`<Suspense>`](/reference/react/Suspense)to display a loading indicator while it's loading.
39
+
`lazy`একটি React component রিটার্ন করে যা আপনি আপনার ট্রিতে রেন্ডার রক্তে পারবেন। যতক্ষণ পর্যন্ত lazy component এর কোড লোড হচ্ছে, এটাকে রেন্ডারের চেষ্টা *suspend* হবে। এটা লোডীং এর সময় লোডীং ইনডিকেটর দেখানোর জন্য [`<Suspense>`](/reference/react/Suspense)ব্যবহার করুন।
40
40
41
41
---
42
42
43
-
### `load`function {/*load*/}
43
+
### `load`ফাংশন {/*load*/}
44
44
45
-
#### Parameters {/*load-parameters*/}
45
+
#### প্যারামিটার {/*load-parameters*/}
46
46
47
-
`load`receives no parameters.
47
+
`load`কোন প্যারামিটার রিসিভ করে না।
48
48
49
-
#### Returns {/*load-returns*/}
49
+
#### রিটার্ন {/*load-returns*/}
50
50
51
-
You need to return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)or some other*thenable* (a Promise-like object with a `then`method). It needs to eventually resolve to a valid React component type, such as a function, [`memo`](/reference/react/memo), or a[`forwardRef`](/reference/react/forwardRef) component.
51
+
আপনাকে একটি [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)অথবা অন্য কোন*thenable* (`then`মেথড সহ একটি Promise-like অবজেক্ট)। একে শেষমেশ একটি যথাযথ React component টাইপে যেতে হবে, যেমন একটি ফাংশন, [`memo`](/reference/react/memo), অথবা একটি[`forwardRef`](/reference/react/forwardRef) component।
52
52
53
53
---
54
54
55
-
## Usage {/*usage*/}
55
+
## ব্যবহার {/*usage*/}
56
56
57
57
### Lazy-loading components with Suspense {/*suspense-for-code-splitting*/}
58
58
59
-
Usually, you import components with the static [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)declaration:
59
+
সাধারণত, আপনি component ইমপোর্ট করেন static [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)ডিক্লেয়ারেশন সহঃ
60
60
61
61
```js
62
62
importMarkdownPreviewfrom'./MarkdownPreview.js';
63
63
```
64
64
65
-
To defer loading this component's code until it's rendered for the first time, replace this import with:
65
+
এই component এর কোডের লোডীং প্রথম বার রেন্ডার হবার আগ পর্যন্ত বিলম্বিত করতে এই ইমপোর্ট নিচের কোড দিয়ে প্রতিস্থাপন করুনঃ
This code relies on [dynamic `import()`,](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import)which might require support from your bundler or framework.
73
+
এই কোড [dynamic `import()`,](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import)এর উপর নির্ভর করে যার আপনার বান্ডলার বা ফ্রেমওয়ার্ক থেকে support এর দরকার পড়তে পারে।
74
74
75
-
Now that your component's code loads on demand, you also need to specify what should be displayed while it is loading. You can do this by wrapping the lazy component or any of its parents into a [`<Suspense>`](/reference/react/Suspense) boundary:
75
+
এখন যেহেতু আপনার component এর কোড চাহিদানুযায়ী লোড হয়, আপনাকে এটা নির্ধারণ করে দিতে হবে যে এটা লোডীং এর সময়ে কী ডিসপ্লে হওয়া উচিত। এটা আপনি করতে পারেন lazy component অথবা এর যেকোন parent কে [`<Suspense>`](/reference/react/Suspense) boundary এর মধ্যে wrap করার মাধ্যমেঃ
76
76
77
77
```js {1,4}
78
78
<Suspense fallback={<Loading />}>
@@ -81,7 +81,7 @@ Now that your component's code loads on demand, you also need to specify what sh
81
81
</Suspense>
82
82
```
83
83
84
-
In this example, the code for `MarkdownPreview`won't be loaded until you attempt to render it. If `MarkdownPreview`hasn't loaded yet, `Loading`will be shown in its place. Try ticking the checkbox:
84
+
এই উদাহরণে, `MarkdownPreview`এর কোড ততক্ষণ লোড হবে না যতক্ষণ আপনি এটা রেন্ডারের চেষ্টা করেন। যদি `MarkdownPreview`লোড না হয়ে থাকে, `Loading`তার নিজের জায়গায় দেখাবে। চেকবক্স টিক করে দেখুনঃ
85
85
86
86
<Sandpack>
87
87
@@ -175,17 +175,17 @@ body {
175
175
176
176
</Sandpack>
177
177
178
-
This demo loads with an artificial delay. The next time you untick and tick the checkbox, `Preview`will be cached, so there will be no loading state. To see the loading state again, click "Reset" on the sandbox.
178
+
এই ডেমো কৃত্রিম একটা বিলম্বের সাথে লোড হয়। এর পরের বার যখন আপনি চেকবক্স টিক করবেন এবং আনটিক করবেন, `Preview`এর cache হয়ে যাবে, সুতরাং কোন লোডীং state থাকবে না। লোডীং state আবার দেখতে চাইলে, স্যান্ডবক্সের উপর "Reset" বাটন ক্লিক করুন।
179
179
180
180
[Learn more about managing loading states with Suspense.](/reference/react/Suspense)
181
181
182
182
---
183
183
184
-
## Troubleshooting {/*troubleshooting*/}
184
+
## ট্রাবলশ্যুট {/*troubleshooting*/}
185
185
186
-
### My`lazy` component's state gets reset unexpectedly {/*my-lazy-components-state-gets-reset-unexpectedly*/}
186
+
### আমার`lazy` component এর state অপ্রত্যাশিতভাবে রিসেট হয়ে যায় {/*my-lazy-components-state-gets-reset-unexpectedly*/}
187
187
188
-
Do not declare `lazy`components *inside* other components:
188
+
`lazy`component গুলোকে অন্যান্য component গুলোর *ভেতরে* ডিক্লেয়ার করবেন নাঃ
189
189
190
190
```js {4-5}
191
191
import { lazy } from'react';
@@ -197,7 +197,7 @@ function Editor() {
197
197
}
198
198
```
199
199
200
-
Instead, always declare them at the top level of your module:
200
+
তার বদলে, এগুলোকে সব সময় আপনার মডিউলের সর্বোচ্চ স্তরে ডিক্লেয়ার করুনঃ
0 commit comments