Skip to content

Commit a38349c

Browse files
committed
feat: ✨ Translate challenge 2 of 4 (partial)
1 parent 46550d3 commit a38349c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

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

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

1104-
এখানে, `ContactList.js` এবং `Chat.js` এর ইভেন্ট হ্যান্ডলারগুলোতে `// TODO` কমেন্ট করা আছে। এজন্যেই ইনপুটটিতে টাইপ করলে কিছু হচ্ছে না, এবং পাশের বাটন গুলোতে ক্লিক করলে মেসেজ রিসিভার বদলাচ্ছেনা।
1104+
এখানে, `ContactList.js` এবং `Chat.js` এর ইভেন্ট হ্যান্ডলারগুলোতে `// TODO` কমেন্ট করা আছে। এজন্যেই ইনপুটটিতে টাইপ করলে কিছু হচ্ছে না, এবং পাশের বাটন গুলোতে ক্লিক করলে মেসেজের প্রাপক বদলাচ্ছেনা।
11051105

11061106
এই দুইটি `// TODO` এর জায়গায় নিজ নিজ action গুলো `dispatch` করার কোড লিখুন। action গুলোর কাঙ্ক্ষিত আকৃতি এবং টাইপ জানার জন্য, `messengerReducer.js` এর মধ্যের reducer টি দেখুন। Reducer টি অলরেডি লিখে দেয়া হয়েছে, তাই সেটিতে আপনার কোনো পরিবর্তন আনতে হবেনা। আপনার শুধু `ContactList.js` এবং `Chat.js` এ action গুলো dispatch করতে হবে।
11071107

@@ -1411,12 +1411,12 @@ textarea {
14111411

14121412
</Solution>
14131413

1414-
#### Clear the input on sending a message {/*clear-the-input-on-sending-a-message*/}
1414+
#### Message সেন্ড করার সাথে সাথে ইনপুট ক্লিয়ার করে দিন {/*clear-the-input-on-sending-a-message*/}
14151415

1416-
Currently, pressing "Send" doesn't do anything. Add an event handler to the "Send" button that will:
1416+
এখানে, "Send" প্রেস করলে কিছু হচ্ছেনা। "Send" বাটনে একটি ইভেন্ট হ্যান্ডলার অ্যাড করুন যার মধ্যেঃ
14171417

1418-
1. Show an `alert` with the recipient's email and the message.
1419-
2. Clear the message input.
1418+
1. একটি `alert` দেখান যাতে প্রাপকের ইমেইল এবং মেসেজ থাকবে।
1419+
2. মেসেজ ইনপুট ক্লিয়ার করে দিন।
14201420

14211421
<Sandpack>
14221422

@@ -1555,7 +1555,7 @@ textarea {
15551555

15561556
<Solution>
15571557

1558-
There are a couple of ways you could do it in the "Send" button event handler. One approach is to show an alert and then dispatch an `edited_message` action with an empty `message`:
1558+
আপনি "Send" বাটন ইভেন্ট হ্যান্ডলারে এমনটা করার দুটি পদ্ধতি আছে। প্রথম পদ্ধতিটি হলো, একটি alert শো করার পরে, `edited_message` action dispatch করা যেখানে `message` এর ভ্যালু হবে `''` বা ফাঁকা স্ট্রিংঃ
15591559

15601560
<Sandpack>
15611561

@@ -1701,7 +1701,7 @@ textarea {
17011701

17021702
</Sandpack>
17031703

1704-
This works and clears the input when you hit "Send".
1704+
এটা কাজ করবে এবং আপনি যখন "Send" করবেন তখন ইনপুট ক্লিয়ার করে দিবে।
17051705

17061706
However, _from the user's perspective_, sending a message is a different action than editing the field. To reflect that, you could instead create a _new_ action called `sent_message`, and handle it separately in the reducer:
17071707

0 commit comments

Comments
 (0)