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/extracting-state-logic-into-a-reducer.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1101,7 +1101,7 @@ Reducers কে অবশ্যই pure হতে হবে, যেন সেগ
1101
1101
1102
1102
#### ইভেন্ট হ্যান্ডলারস থেকে actions কে dispatch করুন {/*dispatch-actions-from-event-handlers*/}
1103
1103
1104
-
এখানে, `ContactList.js` এবং `Chat.js` এর ইভেন্ট হ্যান্ডলারগুলোতে `// TODO` কমেন্ট করা আছে। এজন্যেই ইনপুটটিতে টাইপ করলে কিছু হচ্ছে না, এবং পাশের বাটন গুলোতে ক্লিক করলে মেসেজ রিসিভার বদলাচ্ছেনা।
1104
+
এখানে, `ContactList.js` এবং `Chat.js` এর ইভেন্ট হ্যান্ডলারগুলোতে `// TODO` কমেন্ট করা আছে। এজন্যেই ইনপুটটিতে টাইপ করলে কিছু হচ্ছে না, এবং পাশের বাটন গুলোতে ক্লিক করলে মেসেজের প্রাপক বদলাচ্ছেনা।
1105
1105
1106
1106
এই দুইটি `// TODO` এর জায়গায় নিজ নিজ action গুলো `dispatch` করার কোড লিখুন। action গুলোর কাঙ্ক্ষিত আকৃতি এবং টাইপ জানার জন্য, `messengerReducer.js` এর মধ্যের reducer টি দেখুন। Reducer টি অলরেডি লিখে দেয়া হয়েছে, তাই সেটিতে আপনার কোনো পরিবর্তন আনতে হবেনা। আপনার শুধু `ContactList.js` এবং `Chat.js` এ action গুলো dispatch করতে হবে।
1107
1107
@@ -1411,12 +1411,12 @@ textarea {
1411
1411
1412
1412
</Solution>
1413
1413
1414
-
#### Clear the input on sending a message {/*clear-the-input-on-sending-a-message*/}
1414
+
#### Message সেন্ড করার সাথে সাথে ইনপুট ক্লিয়ার করে দিন {/*clear-the-input-on-sending-a-message*/}
1415
1415
1416
-
Currently, pressing "Send" doesn't do anything. Add an event handler to the "Send" button that will:
1416
+
এখানে, "Send" প্রেস করলে কিছু হচ্ছেনা। "Send" বাটনে একটি ইভেন্ট হ্যান্ডলার অ্যাড করুন যার মধ্যেঃ
1417
1417
1418
-
1.Show an `alert`with the recipient's email and the message.
1419
-
2.Clear the message input.
1418
+
1.একটি `alert`দেখান যাতে প্রাপকের ইমেইল এবং মেসেজ থাকবে।
1419
+
2.মেসেজ ইনপুট ক্লিয়ার করে দিন।
1420
1420
1421
1421
<Sandpack>
1422
1422
@@ -1555,7 +1555,7 @@ textarea {
1555
1555
1556
1556
<Solution>
1557
1557
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` এর ভ্যালু হবে `''` বা ফাঁকা স্ট্রিংঃ
1559
1559
1560
1560
<Sandpack>
1561
1561
@@ -1701,7 +1701,7 @@ textarea {
1701
1701
1702
1702
</Sandpack>
1703
1703
1704
-
This works and clears the input when you hit "Send".
1704
+
এটা কাজ করবে এবং আপনি যখন "Send" করবেন তখন ইনপুট ক্লিয়ার করে দিবে।
1705
1705
1706
1706
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:
0 commit comments