Skip to content

Commit

Permalink
feat: ✨ Translate 100% (Challenge 4 of 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
habibium committed Jul 16, 2024
1 parent ab74ab4 commit 31f7592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/learn/extracting-state-logic-into-a-reducer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2439,7 +2439,7 @@ textarea {
<Solution>
Dispatching an action calls a reducer with the current state and the action, and stores the result as the next state. This is what it looks like in code:
একটি action কে dispatch করলে তা বর্তমান স্টেট এবং action টি নিয়ে reducer কে কল করে, এবং প্রাপ্ত ফলাফলটিকে পরবর্তী স্টেট হিসেবে ব্যাবহার করে। কোডে এটা এমন দেখাবেঃ
<Sandpack>
Expand Down Expand Up @@ -2614,15 +2614,15 @@ textarea {
</Sandpack>
Though it doesn't matter in most cases, a slightly more accurate implementation looks like this:
যদিও অধিকাংশ ক্ষেত্রে তেমন কিছু আসে যায় না, তবে এর আরেকটু সঠিক সমাধান হবেঃ
```js
function dispatch(action) {
setState((s) => reducer(s, action));
}
```
This is because the dispatched actions are queued until the next render, [similar to the updater functions.](/learn/queueing-a-series-of-state-updates)
এর কারণ dispatch করা action গুলো পরবর্তী রেন্ডার পর্যন্ত সারিবদ্ধভাবে দাঁড় করিয়ে রাখা হয়, [updater functions এর মতো।](/learn/queueing-a-series-of-state-updates)
</Solution>
Expand Down

0 comments on commit 31f7592

Please sign in to comment.