File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1086,14 +1086,14 @@ Reducers কে অবশ্যই pure হতে হবে, যেন সেগ
10861086
10871087<Recap >
10881088
1089- - To convert from ` useState ` to ` useReducer ` :
1090- 1 . Dispatch actions from event handlers.
1091- 2 . Write a reducer function that returns the next state for a given state and action.
1092- 3 . Replace ` useState ` with ` useReducer ` .
1093- - Reducers require you to write a bit more code, but they help with debugging and testing.
1094- - Reducers must be pure.
1095- - Each action describes a single user interaction.
1096- - Use Immer if you want to write reducers in a mutating style.
1089+ - ` useState ` কে ` useReducer ` এ পরিবর্তন করতে :
1090+ 1 . ইভেন্ট হ্যান্ডলারসমূহ থেকে actions ডিসপ্যাচ করুন।
1091+ 2 . একটি reducer function যেটি প্রদত্ত স্টেটের জন্য পরবর্তী স্টেট রিটার্ন করে এবং action সমূহ লিখুন।
1092+ 3 . ` useState ` এর জায়গায় ` useReducer ` ব্যবহার করুন।
1093+ - Reducers এর জন্য আপনার একটু বাড়তি কোড লিখতে হয়, কিন্তু এরা ডিবাগিং এবং টেস্টিং এ সহায়ক।
1094+ - Reducers অবশ্যই pure হতে হবে।
1095+ - প্রতিটি action একটি মাত্র user interaction এর বর্ণনা হবে।
1096+ - Immer ব্যবহার করুন যদি আপনি reducers কে mutating স্টাইলে লিখতে চান।
10971097
10981098</Recap >
10991099
You can’t perform that action at this time.
0 commit comments