Skip to content

Commit e6df78f

Browse files
committed
done with the page
1 parent c205840 commit e6df78f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

beta/src/pages/learn/conditional-rendering.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ export default function PackingList() {
452452
453453
<Challenges>
454454
455-
### Show an icon for incomplete items with `? :` {/*show-an-icon-for-incomplete-items-with--*/}
455+
### अधूरे आइटम के लिए `? :` के साथ एक आइकन दिखाएं {/*show-an-icon-for-incomplete-items-with--*/}
456456
457-
Use the conditional operator (`cond ? a : b`) to render a ❌ if `isPacked` isn’t `true`.
457+
एक ❌ रेंडर करने के लिए कंडीशनल ऑपरेटर (`cond ? a : b`) का इस्तेमाल करें अगर `isPacked` `true` नहीं है।
458458
459459
<Sandpack>
460460
@@ -532,15 +532,15 @@ export default function PackingList() {
532532
533533
</Solution>
534534
535-
### Show the item importance with `&&` {/*show-the-item-importance-with-*/}
535+
### आइटम का इम्पोर्टेंस `&&` के साथ दिखाएं {/*show-the-item-importance-with-*/}
536536
537-
In this example, each `Item` receives a numerical `importance` prop. Use the `&&` operator to render "_(Importance: X)_" in italics, but only for items that have non-zero difficulty. Your item list should end up looking like this:
537+
इस उदाहरण में, प्रत्येक `Item` को एक संख्यात्मक `importance` prop प्राप्त होता है। इटैलिक में "_(Importance: X)_" रेंडर करने के लिए `&&` ऑपरेटर का उपयोग करें, लेकिन केवल उन आइटम्स के लिए जिनमें गैर-शून्य कठिनाई है। आपकी आइटम सूची इस तरह दिखनी चाहिए:
538538
539539
* Space suit _(Importance: 9)_
540540
* Helmet with a golden leaf
541541
* Photo of Tam _(Importance: 6)_
542542
543-
Don't forget to add a space between the two labels!
543+
दो लेबलों के बीच एक स्पेस जोड़ना न भूलें!
544544
545545
<Sandpack>
546546
@@ -580,7 +580,7 @@ export default function PackingList() {
580580

581581
<Solution>
582582

583-
This should do the trick:
583+
यह काम कर जाना चाहिए:
584584

585585
<Sandpack>
586586

@@ -622,15 +622,15 @@ export default function PackingList() {
622622
623623
</Sandpack>
624624
625-
Note that you must write `importance > 0 && ...` rather than `importance && ...` so that if the `importance` is `0`, `0` isn't rendered as the result!
625+
ध्यान दें कि आपको `importance && ...` के बजाय `importance > 0 && ...` लिखना होगा ताकि अगर `importance` `0` हो, तो `0` परिणाम के रूप में रेंडर नहीं हो!
626626
627-
In this solution, two separate conditions are used to insert a space between then name and the importance label. Alternatively, you could use a fragment with a leading space: `importance > 0 && <> <i>...</i></>` or add a space immediately inside the `<i>`: `importance > 0 && <i> ...</i>`.
627+
इस समाधान में, नाम और इम्पोर्टेंस लेबल के बीच एक स्पेस डालने के लिए दो अलग-अलग कंडीशंस का उपयोग किया गया है। वैकल्पिक रूप से, आप एक प्रमुख स्पेस के साथ एक फ्रेगमेंट का उपयोग कर सकते हैं: `importance > 0 && <> <i>...</i></>` या `<i>` के अंदर तुरंत एक स्पेस जोड़ें: `importance > 0 && <i> ...</i>`
628628
629629
</Solution>
630630
631-
### Refactor a series of `? :` to `if` and variables {/*refactor-a-series-of---to-if-and-variables*/}
631+
### रिफैक्टर करे एक सीरीज `? :` से `if` और वेरिएबल्स {/*refactor-a-series-of---to-if-and-variables*/}
632632
633-
This `Drink` component uses a series of `? :` conditions to show different information depending on whether the `name` prop is `"tea"` or `"coffee"`. The problem is that the information about each drink is spread across multiple conditions. Refactor this code to use a single `if` statement instead of three `? :` conditions.
633+
यह `Drink` कौम्पोनॅन्ट `? :` कंडीशंस की एक सीरीज का उपयोग करता है `name` prop `"tea"` या `"coffee"` के आधार पर अलग-अलग जानकारी दिखाने क लिए। समस्या यह है कि प्रत्येक ड्रिंक के बारे में जानकारी कई कंडीशंस में फैली हुई है। तीन `? :` कंडीशंस के बजाय एक `if` स्टेटमेंट का उपयोग करने के लिए इस कोड को दोबारा रिफैक्टर करे।
634634
635635
<Sandpack>
636636
@@ -663,11 +663,11 @@ export default function DrinkList() {
663663
664664
</Sandpack>
665665
666-
Once you've refactored the code to use `if`, do you have further ideas on how to simplify it?
666+
एक बार जब आप `if` का उपयोग कर क कोड को रिफैक्टर कर लेते हैं, तो क्या आपके पास इसे सरल बनाने के बारे में और विचार हैं?
667667
668668
<Solution>
669669
670-
There are multiple ways you could go about this, but here is one starting point:
670+
इसके बारे में आप कई तरीके अपना सकते हैं, लेकिन यहां एक प्रारंभिक बिंदु है:
671671
672672
<Sandpack>
673673
@@ -710,9 +710,9 @@ export default function DrinkList() {
710710
711711
</Sandpack>
712712
713-
Here the information about each drink is grouped together instead of being spread across multiple conditions. This makes it easier to add more drinks in the future.
713+
यहां प्रत्येक ड्रिंक के बारे में जानकारी को कई स्थितियों में फैलाने के बजाय एक साथ समूहीकृत किया जाता है। इससे भविष्य में और ड्रिंक जोड़ना आसान हो जाता है।
714714
715-
Another solution would be to remove the condition altogether by moving the information into objects:
715+
एक अन्य उपाय यह होगा कि जानकारी को ऑब्जेक्ट्स में स्थानांतरित करके कंडीशन को पूरी तरह से हटा दिया जाए:
716716
717717
<Sandpack>
718718

0 commit comments

Comments
 (0)