@samitouri / QOS-React / commits / 90888debd0

Clarify section introducing callbacks

Sam Selikoff committed Aug 10, 2014 at 16:47 UTC 90888debd00b752a0cdc446dae4067ee2ce7037f
1 file changed +1 -1
docs/docs/tutorial.md
+1 -1
@@ -519,7 +519,7 @@ We use the `ref` attribute to assign a name to a child component and `this.refs`
519
520 When a user submits a comment, we will need to refresh the list of comments to include the new one. It makes sense to do all of this logic in `CommentBox` since `CommentBox` owns the state that represents the list of comments.
521
522 -We need to pass data from the child component to its parent. We do this by passing a `callback` in props from parent to child:
522 +We need to pass data from the child component back up to its parent. We do this in our parent's `render` method by passing a new callback (`handleCommentSubmit`) into the child, binding it to the child's `onCommentSubmit` event. Whenever the event is triggered, the callback will be invoked:
523
524 ```javascript{15-17,30}
525 // tutorial17.js