-
Notifications
You must be signed in to change notification settings - Fork 49.9k
docs tips pass arguments to callbacks #602
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
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.
key prop
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.
right, thx.
|
+1 I was scratching my head about this too for a while, until I realized its just javascript! |
|
@johnthethird got any idea for a better title? Like what prompted you to look for this? "Passing arguments to callbacks" feels a bit too general. |
|
@chenglou I think it should go in the existing section for Events. It describes all the events that React supports, but no example of how to pass params to those functions. I found this on Github as I was just about to write up a doc change but found you beat me to it. |
|
I don't think it should go into the existing section for Events (it's not directly related), but I think it's a great idea to link from some parts of the docs to related tips. |
|
Alright, just updated. Some review is really needed. |
|
Let's just do the first one in this pull request. We can do the second one in a separate one. Can you factor it out? I'll accept it. |
|
Done! So basically just added a link to the |
docs tips pass arguments to callbacks
#542
Any comment? I don't like the title too much. I prefer describing the situation, e.g. "Parent-Child Communication" rather than just state what the code does. Except there's more to parent-child communication (#478).