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/learn/manipulating-the-dom-with-refs.md
+3-16Lines changed: 3 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -646,21 +646,12 @@ button {
646
646
647
647
<Recap>
648
648
649
-
<<<<<<< HEAD
650
-
- रिफ़्स एक सामान्य अवधारणा हैं, लेकिन सामान्यत: आप इन्हें DOM तत्वों को रखने के लिए उपयोग करेंगे।
649
+
- रेफ्स एक सामान्य अवधारणा हैं, लेकिन सामान्यत: आप इन्हें DOM तत्वों को रखने के लिए उपयोग करेंगे।
651
650
- आप React को `myRef.current` में एक DOM नोड डालने के लिए `<div ref={myRef}>` का उपयोग करके निर्देशित करते हैं।
652
651
- सामान्यत: आप रिफ़्स का उपयोग गैर-हानिकारक क्रियाओं के लिए करेंगे जैसे कि फोकस करना, स्क्रॉल करना, या DOM तत्वों का मापना।
653
-
- एक कौम्पोनॅन्ट डिफ़ॉल्ट रूप से अपने DOM नोड्स को एक्सपोज़ नहीं करता। आप `forwardRef`का उपयोग करके और दूसरे `ref` तर्क को एक विशिष्ट नोड तक भेजकर DOM नोड को एक्सपोज़ करने का विकल्प चुन सकते हैं।
652
+
- एक कौम्पोनॅन्ट डिफ़ॉल्ट रूप से अपने DOM नोड्स को एक्सपोज़ नहीं करता। आप ref प्रॉप का उपयोग करके एक DOM नोड को प्रदर्शित करने के लिए ऑप्ट-इन कर सकते हैं।
654
653
- React द्वारा प्रबंधित DOM नोड्स को बदलने से बचें।
655
654
- यदि आप React द्वारा प्रबंधित DOM नोड्स को बदलते हैं, तो केवल उन हिस्सों को बदलें जिन्हें React अपडेट करने का कोई कारण नहीं है।
656
-
=======
657
-
- Refs are a generic concept, but most often you'll use them to hold DOM elements.
658
-
- You instruct React to put a DOM node into `myRef.current` by passing `<div ref={myRef}>`.
659
-
- Usually, you will use refs for non-destructive actions like focusing, scrolling, or measuring DOM elements.
660
-
- A component doesn't expose its DOM nodes by default. You can opt into exposing a DOM node by using the `ref` prop.
661
-
- Avoid changing DOM nodes managed by React.
662
-
- If you do modify DOM nodes managed by React, modify parts that React has no reason to update.
663
-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
664
655
665
656
</Recap>
666
657
@@ -1059,11 +1050,7 @@ img {
1059
1050
1060
1051
<Hint>
1061
1052
1062
-
<<<<<<< HEAD
1063
-
आपको `forwardRef` की आवश्यकता होगी ताकि आप अपने घटक जैसे `SearchInput` से एक DOM नोड को बाहर एक्सपोज़ कर सकें।
1064
-
=======
1065
-
You'll need to pass `ref` as a prop to opt into exposing a DOM node from your own component like `SearchInput`.
1066
-
>>>>>>> 6326e7b1b9fa2a7e36a555792e2f1b97cfcf2669
1053
+
आपको अपने स्वयं के कंपोनेंट जैसे `SearchInput` से एक DOM नोड को प्रदर्शित करने के लिए `ref` को प्रॉप के रूप में पास करना होगा।
0 commit comments