File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import { default as React , Component } from 'react' ;
2
2
import { r , DefaultSession as RethinkSession } from 'react-rethinkdb' ;
3
3
4
- export const SendMessageForm = React . createClass ( {
4
+ export class SendMessageForm extends Component {
5
+ constructor ( props ) {
6
+ super ( props ) ;
7
+ this . handleSendMessage = this . handleSendMessage . bind ( this ) ;
8
+ }
9
+
5
10
handleSendMessage ( event ) {
6
11
event . preventDefault ( ) ;
7
12
const bodyInput = this . refs . body ;
@@ -13,7 +18,7 @@ export const SendMessageForm = React.createClass({
13
18
createdAt : r . now ( ) ,
14
19
} ) ;
15
20
RethinkSession . runQuery ( query ) ;
16
- } ,
21
+ }
17
22
18
23
render ( ) {
19
24
return (
@@ -29,5 +34,5 @@ export const SendMessageForm = React.createClass({
29
34
</ button >
30
35
</ form >
31
36
) ;
32
- } ,
33
- } ) ;
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments