-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Update stale event docs in tutorial #33
Conversation
The example uses onSubmit but the docs were still referring to onKeyUp.
@@ -483,7 +483,7 @@ var CommentForm = React.createClass({ | |||
|
|||
#### Events | |||
|
|||
React attaches event handlers to components using a camelCase naming convention. We attach an onKeyUp handler to the text field, check if the user has entered text and pressed the enter key and then clear the form fields. | |||
React attaches event handlers to components using a camelCase naming convention. We attach an onSubmit handler to the form that clear the form fields if the user has entered text in both. |
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.
Good catch! 2 things:
... onSubmit handler to the form that clear the form fields ...
"clears"
... if the user has entered text in both.
This doesn't flow as well as I'd like. How about something like "when the form is submitted with with valid input"?
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.
Changed both.
Ah there's a bug in the tutorial; can you add a "return false" to handleSubmit and document that as well? Thanks. |
Done. |
Update stale event docs in tutorial
Experimenting with portals [WIP]
The example uses onSubmit but the docs were still referring to onKeyUp.