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/learn/thinking-in-react.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,26 +254,26 @@ Props এবং state আলাদা বটে, তবে এরা একই
254
254
255
255
আপনার অ্যাপ্লিকেশনের প্রতিটা অংশের state-এর জন্যঃ
256
256
257
-
1.Identify *every* component that renders something based on that state.
258
-
2.Find their closest common parent component--a component above them all in the hierarchy.
259
-
3.Decide where the state should live:
260
-
1.Often, you can put the state directly into their common parent.
261
-
2.You can also put the state into some component above their common parent.
262
-
3.If you can't find a component where it makes sense to own the state, create a new component solely for holding the state and add it somewhere in the hierarchy above the common parent component.
257
+
1.সেই *প্রতিটি* কম্পোনেন্ট চিহ্নিত করুন যা ওই state এর উপর নির্ভর করে কিছু রেন্ডার করে।
258
+
2.তাদের সবচেয়ে কাছের সেই কম্পোনেন্ট খুঁজে বের করুন যা তাদের উভয়েরই parent -- একটি কম্পোনেন্ট যা hierarchy তে তাদের সবার উপরে।
259
+
3.state কোথায় থাকা উচিত সেটা সিদ্ধান্ত নিনঃ
260
+
1.বেশিরভাগ সময়ে, আপনি তাদের সাধারণ parent এ state রেখে দিতে পারবেন।
261
+
2.আপনি তাদের সাধারণ parent এর উপরের কোন কম্পোনেন্টেও state রাখতে পারেন।
262
+
3.আপনি যদি এমন কোন কম্পোনেন্ট খুঁজে না পান যেখানে state রাখা যুক্তিযুক্ত হবে, তাহলে নতুন একটা কম্পোনেন্ট তৈরি করুন শুধুমাত্র তাদের state রাখবার জন্য এবং hierarchy-তে তাদের সাধারণ parent এর উপরে কোথাও যুক্ত করে দিন।
263
263
264
-
In the previous step, you found two pieces of state in this application: the search input text, and the value of the checkbox. In this example, they always appear together, so it makes sense to put them into the same place.
264
+
এর আগের ধাপে অ্যাপ্লিকেশনে আপনি state হবার মত দুটি বিষয় পেয়েছিলেনঃ সার্চের জন্য ইনপুট টেক্সট এবং চেকবক্সের ভ্যালু। এই উদাহরণে, তারা সব সময়ে একই সাথে আসে, তাই তাদেরকে একই জায়গায় রাখাটা যুক্তিযুক্ত হবে।
265
265
266
-
Now let's run through our strategy for them:
266
+
এখন তাদের জন্য আমাদের পরিকল্পনা ঝালাই করে নিই।
267
267
268
-
1.**Identify components that use state:**
269
-
*`ProductTable` needs to filter the product list based on that state (search text and checkbox value).
270
-
*`SearchBar`needs to display that state (search text and checkbox value).
271
-
1.**Find their common parent:**The first parent component both components share is`FilterableProductTable`.
272
-
2.**Decide where the state lives**: We'll keep the filter text and checked state values in`FilterableProductTable`.
268
+
1.**state ব্যবহার করে এমন কম্পোনেন্টগুলো চিহ্নিত করুন**
269
+
*`ProductTable`কে ওই state(সার্চ টেক্সট এবং চেকবক্স) ব্যবহার করে পণ্যের তালিকা বাছাই করতে হবে।
270
+
*`SearchBar`কে ওই state(সার্চ টেক্সট এবং চেকবক্স) দেখাতে হবে।
271
+
1.**তাদের সাধারণ parent খুঁজে বের করুন**প্রথম যেই কম্পোনেন্ট এদের দুজনেরই parent তা হল`FilterableProductTable`।
272
+
2.**State কোথায় থাকবে সেটা সিদ্ধান্ত নিন**: আমরা বাছাই করা text এবং checked state ভ্যালুগুলো `FilterableProductTable` -তে রাখব।
273
273
274
-
So the state values will live in `FilterableProductTable`.
274
+
সুতরাং state ভ্যালুগুলো থাকবে `FilterableProductTable` এর মধ্যে।
275
275
276
-
Add state to the component with the [`useState()` Hook.](/reference/react/useState)Hooks are special functions that let you "hook into" React. Add two state variables at the top of `FilterableProductTable`and specify their initial state:
276
+
কম্পোনেন্টে [`useState()` Hook.](/reference/react/useState)ব্যবহার করে state যুক্ত করুন। Hook হচ্ছে বিশেষ ফাংশন যা আপনাকে Reac† এর "মায়ায় হারাতে" বাধ্য করবে। `FilterableProductTable`এর একদম উপরে দুটো state variable যুক্ত করুন এবং তাদের প্রাথমিক state ঠিক করে দিন।
277
277
278
278
```js
279
279
functionFilterableProductTable({ products }) {
@@ -437,15 +437,15 @@ td {
437
437
438
438
</Sandpack>
439
439
440
-
Notice that editing the form doesn't work yet. There is a console error in the sandbox above explaining why:
440
+
খেয়াল করুন form এর পরিবর্তন এখনো কাজ করে না। উপড়ে স্যান্ডবক্সে আমরা একটা কনসোল এরর দেখতে পাচ্ছি যেটা কারণটা ব্যাখ্যা করে।
441
441
442
442
<ConsoleBlock level="error">
443
443
444
-
You provided a \`value\`prop to a form field without an \`onChange\`handler. This will render a read-only field.
444
+
আপনি \`onChange\`handler নেই এমন একটা ফিল্ডে \`value\` prop পাঠিয়েছেন। এটা কেবলমাত্র একটি read-only ফিল্ড রেন্ডার করবে।
445
445
446
446
</ConsoleBlock>
447
447
448
-
In the sandbox above, `ProductTable` and `SearchBar`read the `filterText`and `inStockOnly`props to render the table, the input, and the checkbox. For example, here is how `SearchBar`populates the input value:
448
+
উপরের স্যান্ডবক্সে, টেবিল, ইনপুট এবং চেকবক্স দেখানোর জন্য `ProductTable`এবং `SearchBar`যথাক্রমে `filterText`এবং `inStockOnly`prop গুলো নজরে রাখে। উদাহরণস্বরূপ, নিচে দেখতে পাবেন কীভাবে `SearchBar`ইনপুটের ভ্যালুগুলোকে সামনে নিয়ে আসে।
449
449
450
450
```js {1,6}
451
451
functionSearchBar({ filterText, inStockOnly }) {
@@ -457,7 +457,7 @@ function SearchBar({ filterText, inStockOnly }) {
457
457
placeholder="Search..."/>
458
458
```
459
459
460
-
However, you haven't added any code to respond to the user actions like typing yet. This will be your final step.
460
+
কিন্তু আপনি এখনো ব্যবহারকারীর কোন কাজ যেমন টাইপিং এর ফলাফল দেখানোর জন্য কোড লিখেননি। এটা হবে আপনার সর্বশেষ ধাপ।
461
461
462
462
463
463
## ধাপ ৫ঃ inverse data flow যুক্ত করুন {/*step-5-add-inverse-data-flow*/}
0 commit comments