Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

English to Hindi: Referencing values with refs #222

Closed
wants to merge 0 commits into from
Closed

English to Hindi: Referencing values with refs #222

wants to merge 0 commits into from

Conversation

khizarq313
Copy link
Contributor

No description provided.

Copy link
Member

@arshadkazmi42 arshadkazmi42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this. I have added review comments till line 44.

Let's get these fixed then we can continue further with the review.

To know more about our review process check #23

---

<Intro>

When you want a component to "remember" some information, but you don't want that information to [trigger new renders](/learn/render-and-commit), you can use a *ref*.
जब आप किसी कंपोनेंट को कुछ जानकारी "याद" करवाना चाहते हों, लेकिन आप नहीं चाहते कि वह जानकारी [नए रेंडर को ट्रिगर करे](/learn/render-and-commit),तब आप एक *ref * का उपयोग कर सकते हैं।
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
जब आप किसी कंपोनेंट को कुछ जानकारी "याद" करवाना चाहते हों, लेकिन आप नहीं चाहते कि वह जानकारी [नए रेंडर को ट्रिगर करे](/learn/render-and-commit),तब आप एक *ref * का उपयोग कर सकते हैं।
जब आप किसी कौम्पोनॅन्ट को कुछ जानकारी "याद" रखवाना चाहते हों, लेकिन आप नहीं चाहते कि वह जानकारी [नए रेंडर को ट्रिगर करे](/learn/render-and-commit), तब आप एक *ref * का उपयोग कर सकते हैं।

- How to update a ref's value
- How refs are different from state
- How to use refs safely
- अपने कंपोनेंट में refs कैसे जोड़ें
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

कंपोनेंट => कौम्पोनॅन्ट

update all the references of this in the whole file. You can do a find and replace

- How to update a ref's value
- How refs are different from state
- How to use refs safely
- अपने कंपोनेंट में refs कैसे जोड़ें
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- अपने कंपोनेंट में refs कैसे जोड़ें
- अपने कौम्पोनॅन्ट में refs कैसे ऐड करें

- How refs are different from state
- How to use refs safely
- अपने कंपोनेंट में refs कैसे जोड़ें
- refs के वैल्यू को कैसे अपडेट करें
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- refs के वैल्यू को कैसे अपडेट करें
- ref के वैल्यू को कैसे अपडेट करें

- How to use refs safely
- अपने कंपोनेंट में refs कैसे जोड़ें
- refs के वैल्यू को कैसे अपडेट करें
- refs state से कैसे अलग होते हैं
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- refs state से कैसे अलग होते हैं
- ref state से कैसे अलग होते हैं

- अपने कंपोनेंट में refs कैसे जोड़ें
- refs के वैल्यू को कैसे अपडेट करें
- refs state से कैसे अलग होते हैं
- refs को सुरक्षित तरीके से कैसे उपयोग करें
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- refs को सुरक्षित तरीके से कैसे उपयोग करें
- ref को सुरक्षित तरीके से कैसे उपयोग करें


</YouWillLearn>

## Adding a ref to your component {/*adding-a-ref-to-your-component*/}
## अपने कंपोनेंट में refs जोड़ना {/*adding-a-ref-to-your-component*/}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## अपने कंपोनेंट में refs जोड़ना {/*adding-a-ref-to-your-component*/}
## अपने कौम्पोनॅन्ट में ref ऐड करना {/*adding-a-ref-to-your-component*/}


You can add a ref to your component by importing the `useRef` Hook from React:
आप React से `useRef` हुक इम्पोर्ट करके अपने कंपोनेंट में एक refs जोड़ सकते हैं:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
आप React से `useRef` हुक इम्पोर्ट करके अपने कंपोनेंट में एक refs जोड़ सकते हैं:
आप React से `useRef` हुक इम्पोर्ट करके अपने कौम्पोनॅन्ट में एक ref ऐड कर सकते हैं:


```js
import { useRef } from 'react';
```

Inside your component, call the `useRef` Hook and pass the initial value that you want to reference as the only argument. For example, here is a ref to the value `0`:
अपने कंपोनेंट के अंदर, `useRef` हुक को कॉल करें और प्रारंभिक वैल्यू पास करें जिसे आप केवल तर्क के रूप में रेफरन्स करना चाहते हैं। उदाहरण के लिए, यहां वैल्यू `0` के लिए एक refs है:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
अपने कंपोनेंट के अंदर, `useRef` हुक को कॉल करें और प्रारंभिक वैल्यू पास करें जिसे आप केवल तर्क के रूप में रेफरन्स करना चाहते हैं। उदाहरण के लिए, यहां वैल्यू `0` के लिए एक refs है:
अपने कौम्पोनॅन्ट के अंदर, `useRef` हुक को कॉल करें और इनिशियल वैल्यू पास करें जिसे आप केवल आर्गुमेंट के रूप में रेफरन्स करना चाहते हैं। उदाहरण के लिए, यहां वैल्यू `0` के लिए एक ref है:


```js
const ref = useRef(0);
```

`useRef` returns an object like this:
`useRef` एक इस तरह के ऑब्जेक्ट को वापस करता है:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`useRef` एक इस तरह के ऑब्जेक्ट को वापस करता है:
`useRef` एक इस तरह के ऑब्जेक्ट को रिटर्न करता है:

@arshadkazmi42
Copy link
Member

@khizarq313 I have added some review comments. Can you fix those, also can you fix the conflict we are seeing in one of the file.

@khizarq313
Copy link
Contributor Author

@khizarq313 I have added some review comments. Can you fix those, also can you fix the conflict we are seeing in one of the file.

sure, I will take a look at it asap.

@khizarq313 khizarq313 closed this Apr 29, 2023
@arshadkazmi42
Copy link
Member

@khizarq313 Looks like you did a force push which removed all the changes and I am seeing the PR is closed. Are you going to open a new PR?

@khizarq313
Copy link
Contributor Author

i was trying to fix the conflict and there was a massage saying that my repository is one commit ahead, i thought that might be causing the conflict so i pressed the sync button...and this happened.. sorry for the trouble i caused...
I am working on translation and yes i will open new pr.

@khizarq313
Copy link
Contributor Author

khizarq313 commented Apr 29, 2023

I am correcting my translation,also i am reffering hindi glossary page
(#2),

i still don't know the reason behind the previously faced conflict,
I need you to clarify me somethings,
this is my first contribution,
i fork the hi.reactjs.org repo then clone it locally,
After translation i should commit it and ask for review through pull request?
am i doing it correctly, or should i need to correct myself ?
any clarification is appricated also i am very sorry for my inconvinence.

@arshadkazmi42
Copy link
Member

Yes. it is correct. Only one thing you need to consider is your fork could get out of sync from the main repository and you will have to sync it with the main repository

You can refer this stackoverflow on how to do this https://stackoverflow.com/a/7244456/3136282

Or I have created a cli tool for this upfork you could also use this.

@khizarq313
Copy link
Contributor Author

sure, I will go with cli tool as it seems simple and easy to use.
Thank you!

@khizarq313
Copy link
Contributor Author

Hey!
What should i write in hindi for word "unreliable",

English:
This is why reading ref.current during render leads to unreliable code. If you need that, use state instead.
Hindi:
इसीलिए रेंडर के दौरान ref.current को पढ़ने से कोड अविश्वसनीय (unreliable) होजाता है। अगर आपको उसकी जरूरत है, तो ref के बजाय state का इस्तेमाल करें।

one more thing...
how should i write this: "escape hatch" or "एस्केप हैच"

@khizarq313
Copy link
Contributor Author

also what should i use for word: synchronously or तुल्यकालिकत ?

@arshadkazmi42
Copy link
Member

@khizarq313 We can use following

synchronously => सिंक्रोनोसली
unreliable => अनरीलाऐबल

एस्केप हैच will be better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1st Review First phase of review beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants