Skip to content

Commit 3d066cb

Browse files
committed
fix: resolve merge conflict and update Bengali translation for StrictMode documentation
1 parent a9bb2cd commit 3d066cb

1 file changed

Lines changed: 19 additions & 41 deletions

File tree

src/content/reference/react/StrictMode.md

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,10 @@ root.render(
4242

4343
স্ট্রিক্ট মোড নিম্নলিখিত development-only আচরণগুলি সক্রিয় করে:
4444

45-
<<<<<<< HEAD
4645
- আপনার কম্পোনেন্টগুলি impure রেন্ডারিং এর কারণে সৃষ্ট বাগ খুঁজে পেতে [একটি অতিরিক্ত সময় রেন্ডার হবে](#fixing-bugs-found-by-double-rendering-in-development)
4746
- আপনার কম্পোনেন্টগুলি ইফেক্ট ক্লিনআপ মিস হবার কারণে সৃষ্ট বাগ খুঁজে পেতে [ইফেক্টগুলি একটি অতিরিক্ত সময় চালাবে](#fixing-bugs-found-by-re-running-effects-in-development)
47+
- আপনার কম্পোনেন্টগুলি রেফ ক্লিনআপ মিস হবার কারণে সৃষ্ট বাগ খুঁজে পেতে [রেফ কলব্যাকগুলি একটি অতিরিক্ত সময় চালাবে](#fixing-bugs-found-by-re-running-ref-callbacks-in-development)
4848
- আপনার কম্পোনেন্টগুলি [deprecated এপিআই ব্যবহারের জন্য পরীক্ষা করা হবে](#fixing-deprecation-warnings-enabled-by-strict-mode)
49-
=======
50-
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
51-
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
52-
- Your components will [re-run refs callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
53-
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
54-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
5549

5650
#### প্রপ্স {/*props*/}
5751

@@ -92,16 +86,10 @@ root.render(
9286

9387
স্ট্রিক্ট মোড নিম্নলিখিত চেক গুলো ডেভেলপমেন্টে সক্রিয় করে:
9488

95-
<<<<<<< HEAD
9689
- আপনার কম্পোনেন্টগুলি impure রেন্ডারিং এর কারণে সৃষ্ট বাগ খুঁজে পেতে [একটি অতিরিক্ত সময় রেন্ডার হবে](#fixing-bugs-found-by-double-rendering-in-development)
9790
- আপনার কম্পোনেন্টগুলি ইফেক্ট ক্লিনআপ মিস হবার কারণে সৃষ্ট বাগ খুঁজে পেতে [ইফেক্টগুলি একটি অতিরিক্ত সময় চালাবে](#fixing-bugs-found-by-re-running-effects-in-development)
91+
- আপনার কম্পোনেন্টগুলি রেফ ক্লিনআপ মিস হবার কারণে সৃষ্ট বাগ খুঁজে পেতে [রেফ কলব্যাকগুলি একটি অতিরিক্ত সময় চালাবে](#fixing-bugs-found-by-re-running-ref-callbacks-in-development)
9892
- আপনার কম্পোনেন্টগুলি [deprecated এপিআই ব্যবহারের জন্য পরীক্ষা করা হবে](#fixing-deprecation-warnings-enabled-by-strict-mode)
99-
=======
100-
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
101-
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
102-
- Your components will [re-run ref callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
103-
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
104-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
10593

10694
**এই সকল চেক শুধুমাত্র ডেভেলপমেন্টেই কাজ করে এবং প্রডাকশন বিল্ডে কোন প্রভাব ফেলে না।**
10795

@@ -845,18 +833,16 @@ button { margin-left: 10px; }
845833
[ইফেক্ট ক্লিনআপ বাস্তবায়ন সম্পর্কে আরও জানুন।](/learn/synchronizing-with-effects#how-to-handle-the-effect-firing-twice-in-development)
846834
847835
---
848-
### Fixing bugs found by re-running ref callbacks in development {/*fixing-bugs-found-by-re-running-ref-callbacks-in-development*/}
849836
850-
<<<<<<< HEAD
851-
### স্ট্রিক্ট মোড দ্বারা সক্রিয় ডিপ্রিকেশন সতর্কতা সংশোধন করা {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
852-
=======
853-
Strict Mode can also help find bugs in [callbacks refs.](/learn/manipulating-the-dom-with-refs)
837+
### ডেভেলপমেন্টে রেফ কলব্যাক পুনরায় চালানোর মাধ্যমে পাওয়া বাগগুলি সংশোধন করা {/*fixing-bugs-found-by-re-running-ref-callbacks-in-development*/}
838+
839+
স্ট্রিক্ট মোড [কলব্যাক রেফগুলিতে](/learn/manipulating-the-dom-with-refs) বাগ খুঁজে পেতেও সাহায্য করতে পারে।
854840
855-
Every callback `ref` has some setup code and may have some cleanup code. Normally, React calls setup when the element is *created* (is added to the DOM) and calls cleanup when the element is *removed* (is removed from the DOM).
841+
প্রতিটি কলব্যাক `ref` এর কিছু সেটআপ কোড থাকে এবং কিছু ক্লিনআপ কোড থাকতে পারে। সাধারণত, React এলিমেন্ট *তৈরি* হলে (DOM-এ যোগ হলে) সেটআপ কল করে এবং এলিমেন্ট *সরানো* হলে (DOM থেকে সরানো হলে) ক্লিনআপ কল করে।
856842
857-
When Strict Mode is on, React will also run **one extra setup+cleanup cycle in development for every callback `ref`.** This may feel surprising, but it helps reveal subtle bugs that are hard to catch manually.
843+
স্ট্রিক্ট মোড চালু থাকলে, React ডেভেলপমেন্টের জন্য প্রতিটি কলব্যাক `ref` এর জন্য **একটি অতিরিক্ত সেটআপ+ক্লিনআপ চক্র চালাবে।** এটি হয়তো অবাক করে দিতে পারে, কিন্তু এটি সূক্ষ্ম বাগগুলি খুঁজে পেতে সাহায্য করে যা ম্যানুয়ালি ধরা কঠিন।
858844
859-
Consider this example, which allows you to select an animal and then scroll to one of them. Notice when you switch from "Cats" to "Dogs", the console logs show that the number of animals in the list keeps growing, and the "Scroll to" buttons stop working:
845+
এই উদাহরণটি বিবেচনা করুন, যা আপনাকে একটি প্রাণী নির্বাচন করতে এবং তারপর তাদের মধ্যে একটিতে স্ক্রোল করতে দেয়। লক্ষ্য করুন যখন আপনি "Cats" থেকে "Dogs" এ স্যুইচ করেন, কনসোল লগগুলি দেখায় যে তালিকায় প্রাণীর সংখ্যা ক্রমাগত বৃদ্ধি পাচ্ছে, এবং "Scroll to" বোতামগুলি কাজ করা বন্ধ করে দেয়:
860846
861847
<Sandpack>
862848
@@ -976,9 +962,9 @@ li {
976962
</Sandpack>
977963
978964
979-
**This is a production bug!** Since the ref callback doesn't remove animals from the list in the cleanup, the list of animals keeps growing. This is a memory leak that can cause performance problems in a real app, and breaks the behavior of the app.
965+
**এটি একটি প্রোডাকশন বাগ!** যেহেতু রেফ কলব্যাক ক্লিনআপে তালিকা থেকে প্রাণীগুলি সরায় না, প্রাণীদের তালিকা ক্রমাগত বৃদ্ধি পেতে থাকে। এটি একটি মেমরি লিক যা একটি প্রকৃত অ্যাপে পারফরম্যান্স সমস্যা সৃষ্টি করতে পারে এবং অ্যাপের আচরণ ভেঙে দিতে পারে।
980966
981-
The issue is the ref callback doesn't cleanup after itself:
967+
সমস্যাটি হলো রেফ কলব্যাক নিজের পরে পরিষ্কার করে না:
982968
983969
```js {6-8}
984970
<li
@@ -993,7 +979,7 @@ The issue is the ref callback doesn't cleanup after itself:
993979
</li>
994980
```
995981
996-
Now let's wrap the original (buggy) code in `<StrictMode>`:
982+
এখন চলুন মূল (বাগযুক্ত) কোডটি `<StrictMode>`-এ মোড়ানো যাক:
997983
998984
<Sandpack>
999985
@@ -1117,9 +1103,9 @@ li {
11171103
11181104
</Sandpack>
11191105
1120-
**With Strict Mode, you immediately see that there is a problem**. Strict Mode runs an extra setup+cleanup cycle for every callback ref. This callback ref has no cleanup logic, so it adds refs but doesn't remove them. This is a hint that you're missing a cleanup function.
1106+
**স্ট্রিক্ট মোডে, আপনি সঙ্গে সঙ্গে দেখতে পাবেন যে একটি সমস্যা আছে**। স্ট্রিক্ট মোড প্রতিটি কলব্যাক রেফের জন্য একটি অতিরিক্ত সেটআপ+ক্লিনআপ চক্র চালায়। এই কলব্যাক রেফের কোনো ক্লিনআপ লজিক নেই, তাই এটি রেফ যোগ করে কিন্তু সেগুলি সরায় না। এটি একটি ইঙ্গিত যে আপনি একটি ক্লিনআপ ফাংশন মিস করছেন।
11211107
1122-
Strict Mode lets you eagerly find mistakes in callback refs. When you fix your callback by adding a cleanup function in Strict Mode, you *also* fix many possible future production bugs like the "Scroll to" bug from before:
1108+
স্ট্রিক্ট মোড আপনাকে কলব্যাক রেফগুলিতে ভুলগুলি আগ্রহের সাথে খুঁজে পেতে দেয়। আপনি যখন স্ট্রিক্ট মোডে একটি ক্লিনআপ ফাংশন যোগ করে আপনার কলব্যাক ঠিক করেন, আপনি *এছাড়াও* অনেক সম্ভাব্য ভবিষ্যতের প্রোডাকশন বাগগুলি ঠিক করেন যেমন আগের "Scroll to" বাগ:
11231109
11241110
<Sandpack>
11251111
@@ -1244,7 +1230,7 @@ li {
12441230
12451231
</Sandpack>
12461232
1247-
Now on inital mount in StrictMode, the ref callbacks are all setup, cleaned up, and setup again:
1233+
এখন স্ট্রিক্ট মোডে প্রাথমিক মাউন্টে, রেফ কলব্যাকগুলি সব সেটআপ, ক্লিনআপ এবং আবার সেটআপ হয়:
12481234
12491235
```
12501236
...
@@ -1255,23 +1241,15 @@ Now on inital mount in StrictMode, the ref callbacks are all setup, cleaned up,
12551241
✅ Adding animal to the map. Total animals: 10
12561242
```
12571243
1258-
**This is expected.** Strict Mode confirms that the ref callbacks are cleaned up correctly, so the size never grows above the expected amount. After the fix, there are no memory leaks, and all the features work as expected.
1244+
**এটি প্রত্যাশিত।** স্ট্রিক্ট মোড নিশ্চিত করে যে রেফ কলব্যাকগুলি সঠিকভাবে পরিষ্কার করা হয়েছে, তাই আকার কখনই প্রত্যাশিত পরিমাণের চেয়ে বেশি বৃদ্ধি পায় না। ফিক্সের পরে, কোনো মেমরি লিক নেই, এবং সমস্ত বৈশিষ্ট্য প্রত্যাশিত অনুযায়ী কাজ করে।
12591245
1260-
Without Strict Mode, it was easy to miss the bug until you clicked around to app to notice broken features. Strict Mode made the bugs appear right away, before you push them to production.
1246+
স্ট্রিক্ট মোড ছাড়া, আপনি অ্যাপে ক্লিক করে ভাঙা বৈশিষ্ট্যগুলি লক্ষ্য না করা পর্যন্ত বাগটি মিস করা সহজ ছিল। স্ট্রিক্ট মোড আপনি সেগুলি প্রোডাকশনে পুশ করার আগেই বাগগুলি সঙ্গে সঙ্গে প্রদর্শন করেছে।
12611247
1262-
---
1263-
### Fixing deprecation warnings enabled by Strict Mode {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
1264-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
1248+
---
1249+
### স্ট্রিক্ট মোড দ্বারা সক্রিয় ডিপ্রিকেশন সতর্কতা সংশোধন করা {/*fixing-deprecation-warnings-enabled-by-strict-mode*/}
12651250
12661251
React সতর্ক করে দেয় যদি কোনো কম্পোনেন্ট `<StrictMode>` ট্রির মধ্যে থাকে এবং সেটি এই পুরাতন APIগুলির যেকোনো একটি ব্যবহার করে:
12671252
1268-
<<<<<<< HEAD
1269-
* [`findDOMNode`](/reference/react-dom/findDOMNode). [অল্টারনেটিভ দেখুন।](https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage)
1270-
* `UNSAFE_` class lifecycle methods like [`UNSAFE_componentWillMount`](/reference/react/Component#unsafe_componentwillmount). [অল্টারনেটিভ দেখুন।](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#migrating-from-legacy-lifecycles)
1271-
* Legacy context ([`childContextTypes`](/reference/react/Component#static-childcontexttypes), [`contextTypes`](/reference/react/Component#static-contexttypes), and [`getChildContext`](/reference/react/Component#getchildcontext)). [অল্টারনেটিভ দেখুন।](/reference/react/createContext)
1272-
* Legacy string refs ([`this.refs`](/reference/react/Component#refs)). [অল্টারনেটিভ দেখুন।](https://reactjs.org/docs/strict-mode.html#warning-about-legacy-string-ref-api-usage)
1273-
=======
1274-
* `UNSAFE_` class lifecycle methods like [`UNSAFE_componentWillMount`](/reference/react/Component#unsafe_componentwillmount). [See alternatives.](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#migrating-from-legacy-lifecycles)
1275-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
1253+
* `UNSAFE_` class lifecycle methods like [`UNSAFE_componentWillMount`](/reference/react/Component#unsafe_componentwillmount). [অল্টারনেটিভ দেখুন।](https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#migrating-from-legacy-lifecycles)
12761254
12771255
এই APIগুলি প্রধানত পুরানো [ক্লাস কম্পোনেন্টস](/reference/react/Component) এ ব্যবহৃত হয়, তাই এগুলি আধুনিক অ্যাপসে হঠাত দেখা যায়।

0 commit comments

Comments
 (0)