Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadkazmi42 authored Oct 2, 2023
1 parent 999cd7e commit e59feae
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/content/learn/referencing-values-with-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,7 @@ console.log(ref.current); // 5

## ref और DOM {/*refs-and-the-dom*/}

<<<<<<< HEAD
आप ref को किसी भी वैल्यू पर पॉइंट कर सकते हैं। हालांकि, एक ref का सबसे आम काम एक DOM एलिमेंट तक पहुंचने का होता है। उदाहरण के लिए, अगर आप किसी input को प्रोग्रामेटिकली focus करना चाहते है। जब आप JSX में ref एट्रिब्यूट में एक ref को पास करते हैं, जैसे `<div ref={myRef}>`, तो React उस संबंधित DOM एलिमेंट को `myRef.current` में रखता हैं। आप इसके बारे में अधिक जानकारी [Manipulating the DOM with Refs](/learn/manipulating-the-dom-with-refs) में पढ़ सकते हैं।
=======
You can point a ref to any value. However, the most common use case for a ref is to access a DOM element. For example, this is handy if you want to focus an input programmatically. When you pass a ref to a `ref` attribute in JSX, like `<div ref={myRef}>`, React will put the corresponding DOM element into `myRef.current`. Once the element is removed from the DOM, React will update `myRef.current` to be `null`. You can read more about this in [Manipulating the DOM with Refs.](/learn/manipulating-the-dom-with-refs)
>>>>>>> 68f417a600c7d7b8c4131e39f8a843a856ae3909
आप ref को किसी भी वैल्यू पर पॉइंट कर सकते हैं। हालांकि, एक ref का सबसे आम काम एक DOM एलिमेंट तक पहुंचने का होता है। उदाहरण के लिए, अगर आप किसी input को प्रोग्रामेटिकली focus करना चाहते है। जब आप JSX में ref एट्रिब्यूट में एक ref को पास करते हैं, जैसे `<div ref={myRef}>`, तो React उस संबंधित DOM एलिमेंट को `myRef.current` में रखता हैं। एलिमेंट के DOM से रिमूव होने के बाद React `myRef.current` को `null` सेट कर देता है। आप इसके बारे में अधिक जानकारी [DOM को Refs के साथ मैनिपुलेट करना](/learn/manipulating-the-dom-with-refs) में पढ़ सकते हैं।

<Recap>

Expand Down Expand Up @@ -660,4 +656,4 @@ export default function Chat() {

</Solution>

</Challenges>
</Challenges>

0 comments on commit e59feae

Please sign in to comment.