Skip to content

Commit 2287825

Browse files
committed
feat: ✨ Finished 54%
- translated step 2 full
1 parent 84a312c commit 2287825

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ function tasksReducer(tasks, action) {
379379

380380
<DeepDive>
381381

382-
#### Why are reducers called this way? {/*why-are-reducers-called-this-way*/}
382+
#### Reducer কে কেনো এভাবে call করা হয়? {/*why-are-reducers-called-this-way*/}
383383

384-
Although reducers can "reduce" the amount of code inside your component, they are actually named after the [`reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) operation that you can perform on arrays.
384+
যদিও reducer আপনার কম্পোনেন্টের ভিতরে কোডের পরিমাণ কমাতে পারে, কিন্তু reducer নাম দেয়ার পিছনে আসল রহস্য হচ্ছে [`reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) অপারেশন, যেটি আপনি array এর উপর প্রয়োগ করতে পারেন।
385385

386-
The `reduce()` operation lets you take an array and "accumulate" a single value out of many:
386+
`reduce()` অপারেশনটি আপনাকে একটি array এর একাধিক ভ্যালুকে "একত্র করে" একটি ভ্যালুতে নিয়ে আনার ক্ষমতা দেয়:
387387

388388
```
389389
const arr = [1, 2, 3, 4, 5];
@@ -392,9 +392,9 @@ const sum = arr.reduce(
392392
); // 1 + 2 + 3 + 4 + 5
393393
```
394394

395-
The function you pass to `reduce` is known as a "reducer". It takes the _result so far_ and the _current item,_ then it returns the _next result._ React reducers are an example of the same idea: they take the _state so far_ and the _action_, and return the _next state._ In this way, they accumulate actions over time into state.
395+
`reduce` কে আপনি যে ফাংশনটি পাস করেন তাকে বলা হয় "reducer"। এটা গ্রহণ করে _এখন অবধি রেজাল্ট_ এবং _বর্তমান item,_ তারপর এটা return করে _পরবর্তী রেজাল্ট।_ React reducer ও এর অনুরূপ: গ্রহণ করে _এখন অবধি state_ এবং _action_, এবং return করে _পরবর্তী state_ এমন করে, সময়ের সাথে সেটি action সমূহকে কে state হিসেবে একত্র করে।
396396

397-
You could even use the `reduce()` method with an `initialState` and an array of `actions` to calculate the final state by passing your reducer function to it:
397+
এমনকি আপনি `reduce()` মেথডটি দিয়েও একটি `initialState` এবং একটি `actions` এর array থেকে সর্বশেষ state বের করতে পারবেন, তার জন্য মেথডটিকে আপনার reducer ফাংশনটি পাস করতে হবে:
398398

399399
<Sandpack>
400400

@@ -453,7 +453,7 @@ export default function tasksReducer(tasks, action) {
453453

454454
</Sandpack>
455455

456-
You probably won't need to do this yourself, but this is similar to what React does!
456+
আপনার নিজের এমনটা করার প্রয়োজন না হওয়ারই সম্ভাবনা বেশি, তবে এটা React যেভাবে করে দেয় তার মতোই!
457457

458458
</DeepDive>
459459

0 commit comments

Comments
 (0)