-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
add note re: handling events in capture phase #2622
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
I've now signed the CLA. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@@ -35,7 +35,7 @@ String type | |||
## Supported Events | |||
|
|||
React normalizes events so that they have consistent properties across | |||
different browsers. | |||
different browsers. The event handlers below are triggered by an event in the bubbling phase; to register an event handler for the capture phase, append "Capture" to the event name (for example: onClick -> onClickCapture). |
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.
I think this sounds pretty good. Just a little tweak:
- Let's use backticks around the event names so they use code formatting
- "(for example: onClick -> onClickCapture)" can be it's own sentence. "Instead of using
onClick
, you would useonClickCapture
to handle the click event in the capture phase" ... or something like that.
use backticks and change example into its own sentence
@zpao, made the changes |
Thanks! |
add note re: handling events in capture phase
add note re: handling events in capture phase
Couldn't find any mention in the documentation on how to handle events during the capture phase. I added a sentence in the events documentation to explain the "...Capture" syntax. Feel free to move the explanation elsewhere.