-
Notifications
You must be signed in to change notification settings - Fork 131
[Translation] Building Your Own Hooks #68
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
Conversation
Deploy preview for hi-reactjs ready! Built with commit 0592c1b |
Thanks @visshaljagtap for working on this. |
@arshadkazmi42 I have taken the page that is listed in #1 itself also the page is already assigned to me. I think hooks pages translation should also be on priority. |
@visshaljagtap Yes. Right. |
Any updates @arshadkazmi42 |
@visshaljagtap I have been a bit busy. I will get to it soon |
There was a problem hiding this 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. And great start.
i have added couple of feedbacks. can you go through and fix those.
We will continue review once these are fixed.
Refer #23 to know more about our review process
Added review till line 197
content/docs/hooks-custom.md
Outdated
@@ -36,7 +36,7 @@ function FriendStatus(props) { | |||
} | |||
``` | |||
|
|||
Now let's say that our chat application also has a contact list, and we want to render names of online users with a green color. We could copy and paste similar logic above into our `FriendListItem` component but it wouldn't be ideal: | |||
अब बताते हैं कि हमारे चैट एप्लिकेशन की एक संपर्क सूची भी है, और हम हरे रंग के साथ ऑनलाइन उपयोगकर्ताओं के नाम प्रस्तुत करना चाहते हैं | हम इसी तरह के लॉजिक को अपने `FriendListItem` में कॉपी और पेस्ट कर सकते हैं लेकिन यह सही नहीं होगा: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
करना चाहते हैं |
=> करना चाहते हैं।
content/docs/hooks-custom.md
Outdated
|
||
Traditionally in React, we've had two popular ways to share stateful logic between components: [render props](/docs/render-props.html) and [higher-order components](/docs/higher-order-components.html). We will now look at how Hooks solve many of the same problems without forcing you to add more components to the tree. | ||
परंपरागत रूप से React में, हमारे पास कौम्पोनॅन्ट के बीच स्टेटफुल लॉजिक शेयर करने के दो लोकप्रिय तरीके हैं: [रेंडर प्रॉप्स](/docs/render-props.html) and [higher-order कौम्पोनॅन्ट](/docs/higher-order-components.html) | अब हम इस बात पर ध्यान देंगे कि Hooks आपको आपके tree में अधिक कौम्पोनॅन्ट को ऐड करने के लिए मजबूर किए बिना कैसे समस्याओं का समाधान करते हैं। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
कौम्पोनॅन्ट
=> कौम्पोनॅन्टस
change this at both the places
content/docs/hooks-custom.md
Outdated
|
||
Traditionally in React, we've had two popular ways to share stateful logic between components: [render props](/docs/render-props.html) and [higher-order components](/docs/higher-order-components.html). We will now look at how Hooks solve many of the same problems without forcing you to add more components to the tree. | ||
परंपरागत रूप से React में, हमारे पास कौम्पोनॅन्ट के बीच स्टेटफुल लॉजिक शेयर करने के दो लोकप्रिय तरीके हैं: [रेंडर प्रॉप्स](/docs/render-props.html) and [higher-order कौम्पोनॅन्ट](/docs/higher-order-components.html) | अब हम इस बात पर ध्यान देंगे कि Hooks आपको आपके tree में अधिक कौम्पोनॅन्ट को ऐड करने के लिए मजबूर किए बिना कैसे समस्याओं का समाधान करते हैं। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
html) | अब हम
=> html)। अब हम
content/docs/hooks-custom.md
Outdated
|
||
When we want to share logic between two JavaScript functions, we extract it to a third function. Both components and Hooks are functions, so this works for them too! | ||
जब हम दो JavaScript फंक्शन के बीच लॉजिक शेयर करना चाहते हैं, तब हम इसे तीसरे फंक्शन में निकालते हैं। दोनों कौम्पोनॅन्ट और Hook फंक्शन हैं, तो यह उनके लिए भी काम करता है! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
कौम्पोनॅन्ट
=> कौम्पोनॅन्टस
content/docs/hooks-custom.md
Outdated
|
||
### Tip: Pass Information Between Hooks {#tip-pass-information-between-hooks} | ||
### टिप: Hook के बीच जानकारी पास करें | ||
{#tip-pass-information-between-hooks} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to line 152
content/docs/hooks-custom.md
Outdated
|
||
To illustrate this, we'll use another component from our hypothetical chat example. This is a chat message recipient picker that displays whether the currently selected friend is online: | ||
इसे समझने के लिए, हम अपने काल्पनिक चैट उदाहरण से एक और कौम्पोनॅन्ट का उपयोग करेंगे | यह एक चैट संदेश प्राप्तकर्ता पिकर है जो प्रदर्शित करता है कि वर्तमान में चुना गया दोस्त ऑनलाइन है: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
करेंगे |
=> करेंगे।
content/docs/hooks-custom.md
Outdated
@@ -183,25 +184,24 @@ function ChatRecipientPicker() { | |||
); | |||
} | |||
``` | |||
हम चुना गया friend ID को `recipientID` state variable में रखते हैं, और इसे अपडेट करेंगे यदि यूजर `<select>` पिकर में एक अलग दोस्त चुनता है। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
चुना गया
=> चुने गए
content/docs/hooks-custom.md
Outdated
@@ -183,25 +184,24 @@ function ChatRecipientPicker() { | |||
); | |||
} | |||
``` | |||
हम चुना गया friend ID को `recipientID` state variable में रखते हैं, और इसे अपडेट करेंगे यदि यूजर `<select>` पिकर में एक अलग दोस्त चुनता है। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable
=> वेरिएबल
content/docs/hooks-custom.md
Outdated
|
||
```js | ||
const [recipientID, setRecipientID] = useState(1); | ||
const isRecipientOnline = useFriendStatus(recipientID); | ||
``` | ||
|
||
This lets us know whether the *currently selected* friend is online. If we pick a different friend and update the `recipientID` state variable, our `useFriendStatus` Hook will unsubscribe from the previously selected friend, and subscribe to the status of the newly selected one. | ||
इससे हमें पता चलता है कि *वर्तमान में चयनित* मित्र ऑनलाइन है या नहीं| अगर हम एक अलग दोस्त चुनें और `recipientID` state variable अद्यतन करें, तो हमारा `useFriendStatus` Hook पहले से चयनित दोस्त से सदस्यता समाप्त कर देगा, और नव चयनित एक की स्टेटस के लिए सदस्यता लें। |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
नहीं|
=> नहीं।
@arshadkazmi42 Done with the mentioned changes please review! |
any updates @arshadkazmi42 |
Awaiting @arshadkazmi42 |
@visshaljagtap little occupied. will get to it soon |
We are moving our focus to beta pages. So closing this now. Sorry about this, but feel free to pick a new page from #168 |
Hi @arshadkazmi42, please review and let me know if any changes needed!