@@ -14,15 +14,15 @@ var CommentsBox = React.createClass({
1414 initialComments : React . PropTypes . array . isRequired ,
1515 commentsPerPage : React . PropTypes . number . isRequired
1616 } ,
17- getInitialState : function ( ) {
17+ getInitialState ( ) {
1818 return {
1919 comments : this . props . initialComments ,
2020 page : 1 ,
2121 hasMore : true ,
2222 loadingMore : false
2323 } ;
2424 } ,
25- loadMoreClicked : function ( evt ) {
25+ loadMoreClicked ( evt ) {
2626 var nextPage = this . state . page + 1 ;
2727 this . setState ( {
2828 page : nextPage ,
@@ -43,7 +43,7 @@ var CommentsBox = React.createClass({
4343 xhr . send ( ) ;
4444 return false ;
4545 } ,
46- render : function ( ) {
46+ render ( ) {
4747 var commentNodes = this . state . comments . map ( function ( comment ) {
4848 return < Comment author = { comment . Author } > { comment . Text } </ Comment > ;
4949 } ) ;
@@ -58,7 +58,7 @@ var CommentsBox = React.createClass({
5858 </ div >
5959 ) ;
6060 } ,
61- renderMoreLink : function ( ) {
61+ renderMoreLink ( ) {
6262 if ( this . state . loadingMore ) {
6363 return < em > Loading...</ em > ;
6464 } else if ( this . state . hasMore ) {
@@ -77,7 +77,7 @@ var Comment = React.createClass({
7777 propTypes : {
7878 author : React . PropTypes . object . isRequired
7979 } ,
80- render : function ( ) {
80+ render ( ) {
8181 return (
8282 < li >
8383 < Avatar author = { this . props . author } />
@@ -92,7 +92,7 @@ var Avatar = React.createClass({
9292 propTypes : {
9393 author : React . PropTypes . object . isRequired
9494 } ,
95- render : function ( ) {
95+ render ( ) {
9696 return (
9797 < img
9898 src = { this . getPhotoUrl ( this . props . author ) }
@@ -103,7 +103,7 @@ var Avatar = React.createClass({
103103 />
104104 ) ;
105105 } ,
106- getPhotoUrl : function ( author ) {
106+ getPhotoUrl ( author ) {
107107 return 'http://graph.facebook.com/' + author . Facebook + '/picture' ;
108108 }
109109} ) ;
0 commit comments