Translated "Responding to Events" page#311
Merged
arshadkazmi42 merged 4 commits intoreactjs:mainfrom Nov 13, 2024
Merged
Conversation
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
arshadkazmi42
requested changes
Nov 13, 2024
Member
arshadkazmi42
left a comment
There was a problem hiding this comment.
Thank you for working on this.
added a few minor comments
| </YouWillLearn> | ||
|
|
||
| ## Adding event handlers {/*adding-event-handlers*/} | ||
| ## Event handler डालना {/*adding-event-handlers*/} |
Member
There was a problem hiding this comment.
Suggested change
| ## Event handler डालना {/*adding-event-handlers*/} | |
| ## Event handler ऐड करना {/*adding-event-handlers*/} |
| ## Event handler डालना {/*adding-event-handlers*/} | ||
|
|
||
| To add an event handler, you will first define a function and then [pass it as a prop](/learn/passing-props-to-a-component) to the appropriate JSX tag. For example, here is a button that doesn't do anything yet: | ||
| Event handler जोड़ने के लिए, पहले एक फंक्शन को परिभाषित करें और फिर उसे props के रूप में पास करें उपयुक्त JSX टैग में। उदाहरण के लिए, यहाँ एक बटन है जो अभी कुछ नहीं करता है: |
Member
There was a problem hiding this comment.
Suggested change
| Event handler जोड़ने के लिए, पहले एक फंक्शन को परिभाषित करें और फिर उसे props के रूप में पास करें उपयुक्त JSX टैग में। उदाहरण के लिए, यहाँ एक बटन है जो अभी कुछ नहीं करता है: | |
| Event handler ऐड करने के लिए, पहले एक फंक्शन को परिभाषित करें और फिर उसे props के रूप में पास करें उपयुक्त JSX टैग में। उदाहरण के लिए, यहाँ एक बटन है जो अभी कुछ नहीं करता है: |
| </Sandpack> | ||
|
|
||
| You can make it show a message when a user clicks by following these three steps: | ||
| आप उपयोगकर्ता द्वारा क्लिक करने पर संदेश दिखाने के लिए निम्न तीन चरणों का पालन कर सकते हैं: |
Member
There was a problem hiding this comment.
Suggested change
| आप उपयोगकर्ता द्वारा क्लिक करने पर संदेश दिखाने के लिए निम्न तीन चरणों का पालन कर सकते हैं: | |
| आप यूजर द्वारा क्लिक करने पर संदेश दिखाने के लिए निम्न तीन चरणों का पालन कर सकते हैं: |
| 1. Declare a function called `handleClick` *inside* your `Button` component. | ||
| 2. Implement the logic inside that function (use `alert` to show the message). | ||
| 3. Add `onClick={handleClick}` to the `<button>` JSX. | ||
| 1. अपने `Button` कौम्पोनॅन्ट के *अंदर* `handleClick` नाम का एक फंक्शन घोषित करें। |
Member
There was a problem hiding this comment.
Suggested change
| 1. अपने `Button` कौम्पोनॅन्ट के *अंदर* `handleClick` नाम का एक फंक्शन घोषित करें। | |
| 1. अपने `Button` कौम्पोनॅन्ट के *अंदर* `handleClick` नाम का एक फंक्शन डिक्लेअर करें। |
Member
There was a problem hiding this comment.
can you delete this file.
Contributor
Author
|
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hindi translation for
Responding to Eventsis done, opening PR for review.