Browse Source

Update stale event docs in tutorial

The example uses onSubmit but the docs were still referring to onKeyUp.
main
Ben Alpert 12 years ago
parent
commit
ccd06e728a
  1. 2
      docs/tutorial.md

2
docs/tutorial.md

@ -483,7 +483,7 @@ var CommentForm = React.createClass({
#### Events #### 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.
`React.autoBind()` is a simple way to ensure that a method is always bound to its component. Inside the method, `this` will be bound to the component instance. `React.autoBind()` is a simple way to ensure that a method is always bound to its component. Inside the method, `this` will be bound to the component instance.

Loading…
Cancel
Save