Explorar o código

Listing 19: adding comments - using the custom callback.

Frederic G. MARAND %!s(int64=9) %!d(string=hai) anos
pai
achega
54a1dd4320
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      public/scripts/tutorial.js

+ 1 - 1
public/scripts/tutorial.js

@@ -49,7 +49,7 @@ let CommentForm = React.createClass({
     if (!text || !author) {
       return;
     }
-    // TODO send request to the server.
+    this.props.onCommentSubmit({ author: author, text: text });
     this.setState({ author: '', text: '' });
   },
   handleTextChange: function (e) {