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/reference/react/forwardRef.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -469,19 +469,19 @@ input {
469
469
470
470
**Ref অতিরিক্ত ব্যবহার করবেন না।** শুধুমাত্র *imperative* আচরণ যা আপনি prop দিয়ে দেখাতে পারবেন না সেগুলোর ক্ষেত্রেই ref ব্যবহার করবেনঃ যেমন, নোড স্ক্রোল করা, নোড ফোকাস করা, এনিমশন ট্রিগার করা, টেক্সট সিলেক্ট করা, ইত্যাদি।
471
471
472
-
**If you can express something as a prop, you should not use a ref.** For example, instead of exposing an imperative handle like `{ open, close }` from a `Modal`component, it is better to take `isOpen` as a prop like `<Modal isOpen={isOpen} />`. [Effects](/learn/synchronizing-with-effects)can help you expose imperative behaviors via props.
472
+
**আপনি যদি কোন কিছু prop এর মাধ্যমে উন্মুক্ত করতে পারেন, তবে ref ব্যবহার করা উচিত হবে না।** যেমন, `Modal`কম্পোনেন্ট থেকে এর মত একটি imperative handle এক্সপোজ করার বদলে, `<Modal isOpen={isOpen} />` এর মত করে `isOpen` prop নেওয়া বেশি ভাল হবে। [Effects](/learn/synchronizing-with-effects)prop এর মাধ্যমে আপনাকে imperative আচরণ এক্সপোজের সুযোগ দেবে।
473
473
474
474
</Pitfall>
475
475
476
476
---
477
477
478
-
## Troubleshooting {/*troubleshooting*/}
478
+
## ট্রাবলশ্যুট {/*troubleshooting*/}
479
479
480
-
### My component is wrapped in `forwardRef`, but the`ref`to it is always`null` {/*my-component-is-wrapped-in-forwardref-but-the-ref-to-it-is-always-null*/}
480
+
### আমার কম্পোনেন্ট `forwardRef` এর মধ্যে wrap করা, কিন্তু এর`ref`সবসময়`null` {/*my-component-is-wrapped-in-forwardref-but-the-ref-to-it-is-always-null*/}
481
481
482
-
This usually means that you forgot to actually use the `ref` that you received.
482
+
সাধারণত এর অর্থ হল আপনি যেই `ref` রিসিভ করেছেন, সেটা ব্যবহার করতে ভুলে গেছেন।
483
483
484
-
For example, this component doesn't do anything with its `ref`:
484
+
উদাহরণস্বরূপ, এই কম্পোনেন্ট এই `ref` এর সাথে কিছু করে নাঃ
If`showInput`is `false`, then the ref won't be forwarded to any node, and a ref to `MyInput`will remain empty. This is particularly easy to miss if the condition is hidden inside another component, like `Panel` in this example:
523
+
যদি`showInput``false` হয়, তাহলে ref কোন নোডে ফরোয়ার্ড হবে না, এবং `MyInput`এর একটি ref ফাঁকা থাকবে। বিশেষ করে এই বিষয়টি সহজেই উপেক্ষিত হতে পারে যদি কন্ডিশন অন্য কোন কম্পোনেন্টের মধ্যে লুকিয়ে থাকে, যেমন এই উদাহরণে `Panel`:
0 commit comments