The library for web and native user interfaces.
Update stale event docs in tutorial
The example uses onSubmit but the docs were still referring to onKeyUp.
Ben Alpert committed
May 30, 2013 at 18:24 UTC
ea82dba555b3380bb7d3bd53c82276388657f102
1 file changed
+1
-1
docs/docs/tutorial.md
+1
-1
@@ -483,7 +483,7 @@ var CommentForm = React.createClass({
483
484
#### Events
485
486
-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.
486
+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.
487
488
`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.
489