Skip to content

Commit 46550d3

Browse files
committed
feat: ✨ Translate challenge 1 of 4
1 parent 33999e6 commit 46550d3

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/content/learn/extracting-state-logic-into-a-reducer.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,17 +1099,17 @@ Reducers কে অবশ্যই pure হতে হবে, যেন সেগ
10991099

11001100
<Challenges>
11011101

1102-
#### Dispatch actions from event handlers {/*dispatch-actions-from-event-handlers*/}
1102+
#### ইভেন্ট হ্যান্ডলারস থেকে actions কে dispatch করুন {/*dispatch-actions-from-event-handlers*/}
11031103

1104-
Currently, the event handlers in `ContactList.js` and `Chat.js` have `// TODO` comments. This is why typing into the input doesn't work, and clicking on the buttons doesn't change the selected recipient.
1104+
এখানে, `ContactList.js` এবং `Chat.js` এর ইভেন্ট হ্যান্ডলারগুলোতে `// TODO` কমেন্ট করা আছে। এজন্যেই ইনপুটটিতে টাইপ করলে কিছু হচ্ছে না, এবং পাশের বাটন গুলোতে ক্লিক করলে মেসেজ রিসিভার বদলাচ্ছেনা।
11051105

1106-
Replace these two `// TODO`s with the code to `dispatch` the corresponding actions. To see the expected shape and the type of the actions, check the reducer in `messengerReducer.js`. The reducer is already written so you won't need to change it. You only need to dispatch the actions in `ContactList.js` and `Chat.js`.
1106+
এই দুইটি `// TODO` এর জায়গায় নিজ নিজ action গুলো `dispatch` করার কোড লিখুন। action গুলোর কাঙ্ক্ষিত আকৃতি এবং টাইপ জানার জন্য, `messengerReducer.js` এর মধ্যের reducer টি দেখুন। Reducer টি অলরেডি লিখে দেয়া হয়েছে, তাই সেটিতে আপনার কোনো পরিবর্তন আনতে হবেনা। আপনার শুধু `ContactList.js` এবং `Chat.js` এ action গুলো dispatch করতে হবে।
11071107

11081108
<Hint>
11091109

1110-
The `dispatch` function is already available in both of these components because it was passed as a prop. So you need to call `dispatch` with the corresponding action object.
1110+
`dispatch` ফাংশনটি অলরেডি উভয় কম্পোনেন্টের মধ্যে বিদ্যমান কারণ সেটিকে প্রপ হিসেবে পাঠিয়ে দেয়া হয়েছিলো। তাই আপনার শুধু `dispatch` এর মধ্যে উপযুক্ত অবজেক্ট দিয়ে কল করতে হবে।
11111111

1112-
To check the action object shape, you can look at the reducer and see which `action` fields it expects to see. For example, the `changed_selection` case in the reducer looks like this:
1112+
Action অবজেক্টটির আকৃতি চেক করার জন্য, আপনি reducer টির কোড দেখতে পারেন এবং বুঝতে পারেন কোন কোন `action` ফিল্ড সেটি পেতে পারে। যেমন, reducer এ `changed_selection` case টি এমন দেখা যাচ্ছেঃ
11131113

11141114
```js
11151115
case 'changed_selection': {
@@ -1120,7 +1120,7 @@ case 'changed_selection': {
11201120
}
11211121
```
11221122

1123-
This means that your action object should have a `type: 'changed_selection'`. You also see the `action.contactId` being used, so you need to include a `contactId` property into your action.
1123+
এর মানে হচ্ছে আপনার action অবজেক্ট এ `type: 'changed_selection'` থাকতে হবে। আপনি আরও দেখতে পাচ্ছেন যে `action.contactId` এখানে ব্যাবহৃত হচ্ছে, তাই আপনার action অবজেক্ট এ একটি `contactId` প্রপার্টি থাকতে হবে।
11241124

11251125
</Hint>
11261126

@@ -1256,7 +1256,7 @@ textarea {
12561256

12571257
<Solution>
12581258

1259-
From the reducer code, you can infer that actions need to look like this:
1259+
Reducer এর কোড দেখে, আপনি বুঝতে পারেন যে action গুলো দেখতে এমন হতে হবেঃ
12601260

12611261
```js
12621262
// When the user presses "Alice"
@@ -1272,7 +1272,7 @@ dispatch({
12721272
});
12731273
```
12741274

1275-
Here is the example updated to dispatch the corresponding messages:
1275+
এই হলো আগের উদাহরণের সমাধান। এখানের কোডে উপযুক্ত action গুলো dispatch করা হয়েছে।
12761276

12771277
<Sandpack>
12781278

0 commit comments

Comments
 (0)