Use ES7 class properties initializers

This commit is contained in:
Andrey Okonetchnikov
2016-10-03 14:25:27 +02:00
parent 190f9c2613
commit 382b1537b0
19 changed files with 160 additions and 288 deletions

View File

@ -6,13 +6,9 @@ export default class AuthenticationPage extends React.Component {
onLogin: React.PropTypes.func.isRequired
};
constructor(props) {
super(props);
this.state = {};
this.handleLogin = this.handleLogin.bind(this);
}
state = {};
handleLogin(e) {
handleLogin = e => {
e.preventDefault();
let auth;
if (document.location.host.split(':')[0] === 'localhost') {
@ -28,7 +24,7 @@ export default class AuthenticationPage extends React.Component {
}
this.props.onLogin(data);
});
}
};
render() {
const { loginError } = this.state;