Skip to content
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

Merged
merged 3 commits into from
May 31, 2013
Merged

Conversation

sophiebits
Copy link
Collaborator

The example uses onSubmit but the docs were still referring to onKeyUp.

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.
Copy link
Member

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"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed both.

@petehunt
Copy link
Contributor

Ah there's a bug in the tutorial; can you add a "return false" to handleSubmit and document that as well? Thanks.

@sophiebits
Copy link
Collaborator Author

Done.

petehunt added a commit that referenced this pull request May 31, 2013
Update stale event docs in tutorial
@petehunt petehunt merged commit 824a2e0 into facebook:master May 31, 2013
bvaughn added a commit to bvaughn/react that referenced this pull request Aug 13, 2019
Experimenting with portals [WIP]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants