translate "Passing Data Deeply with Context" page by aayush301 · Pull Request #337 · reactjs/hi.react.dev
| ``` | ||
|
|
||
| Currently, the `Heading` component reads `level` from props: | ||
| वर्तमान में, `Heading` कॉम्पोनेन्ट प्रॉप्स से `level` प्राप्त करता है: |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| वर्तमान में, `Heading` कॉम्पोनेन्ट प्रॉप्स से `level` प्राप्त करता है: | |
| वर्तमान में, `Heading` कौम्पोनॅन्ट प्रॉप्स से `level` प्राप्त करता है: |
can you use this spelling for component. update all places in the file
| ``` | ||
|
|
||
| Instead, remove the `level` prop and read the value from the context you just imported, `LevelContext`: | ||
| इसके बजाय, `level` प्रोप को हटा दें और आपके द्वारा आयात किए गए कॉन्टेक्स्ट `LevelContext` से मान पढ़ें: |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| इसके बजाय, `level` प्रोप को हटा दें और आपके द्वारा आयात किए गए कॉन्टेक्स्ट `LevelContext` से मान पढ़ें: | |
| इसके बजाय, `level` प्रोप को हटा दें और आपके द्वारा इम्पोर्ट किए गए कॉन्टेक्स्ट `LevelContext` से वैल्यू रीड करें: |
| यदि आप कॉन्टेक्स्ट प्रदान नहीं करते हैं, तो React पिछले चरण में आपके द्वारा निर्दिष्ट डिफ़ॉल्ट मान का उपयोग करेगा। इस उदाहरण में, आपने `1` को `createContext` के आर्ग्युमेंट के रूप में निर्दिष्ट किया था, इसलिए `useContext(LevelContext)` `1` रिटर्न करता है, जिससे वे सभी शीर्षक `<h1>` पर सेट हो गए हैं। आइए इस समस्या को प्रत्येक `Section` अपना कॉन्टेक्स्ट प्रदान कराने के द्वारा ठीक करें । | ||
|
|
||
| ### Step 3: Provide the context {/*step-3-provide-the-context*/} | ||
| ### चरण 3: कॉन्टेक्स्ट प्रदान करें {/*step-3-provide-the-context*/} |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### चरण 3: कॉन्टेक्स्ट प्रदान करें {/*step-3-provide-the-context*/} | |
| ### स्टेप 3: कॉन्टेक्स्ट प्रदान करें {/*step-3-provide-the-context*/} |
update all the steps with this
| ### चरण 3: कॉन्टेक्स्ट प्रदान करें {/*step-3-provide-the-context*/} | ||
|
|
||
| The `Section` component currently renders its children: | ||
| वर्तमान में `Section` कॉम्पोनेन्ट अपने चिल्ड्रन को रेंडर करता है: |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| वर्तमान में `Section` कॉम्पोनेन्ट अपने चिल्ड्रन को रेंडर करता है: | |
| अभी `Section` कौम्पोनॅन्ट अपने चिल्ड्रन को रेंडर करता है: |