Add constructor to handle this

This commit is contained in:
Yuya Ochiai 2016-11-19 15:30:22 +09:00
parent 1752cec20d
commit e4f961f2f0
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,11 @@ const ReactDOM = require('react-dom');
const {Button, Col, ControlLabel, Form, FormGroup, FormControl, Modal} = require('react-bootstrap');
class LoginModal extends React.Component {
constructor(props) {
super(props);
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(event) {
event.preventDefault();
const usernameNode = ReactDOM.findDOMNode(this.refs.username);

View file

@ -1,6 +1,12 @@
const React = require('react');
class TeamListItem extends React.Component {
constructor(props) {
super(props);
this.handleTeamRemove = this.handleTeamRemove.bind(this);
this.handleTeamEditing = this.handleTeamEditing.bind(this);
}
handleTeamRemove() {
this.props.onTeamRemove();
}