(async () => {
const count = await new Vkontakte().getCounter();
console.log(count);
})()
class App extends React.Component {
// ES2015
constructor() {
this.onClick = this.modal.bind(this, 'auth', 'show');
}
// ES.Next
onClick = () => this.modal('auth', 'show');
modal(name,e) {
console.log(name,e);
}
render() {
return (
<button onClick={this.onClick}>Войти</button>
)
}
}