这里的函数为什么不写成function constructor(props){
...
}
class LoginControl extends ReactDOM.Componet(){
constructor(props){
super(props);
this.handleLoginClick = this.handleLoginClick.bind(this);
}
}
这里的函数为什么不写成function constructor(props){
...
}
class LoginControl extends ReactDOM.Componet(){
constructor(props){
super(props);
this.handleLoginClick = this.handleLoginClick.bind(this);
}
}
4 回答1.7k 阅读
2 回答1.2k 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
4 回答1.5k 阅读
1 回答760 阅读✓ 已解决
2 回答942 阅读✓ 已解决
2 回答1.1k 阅读
这是es6 class的写法,你可以看下关于es6 class部分的内容