Преглед изворни кода

Listing 19: adding comments - using the custom callback.

Frederic G. MARAND пре 9 година
родитељ
комит
54a1dd4320
1 измењених фајлова са 1 додато и 1 уклоњено
  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) {