We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<button onClick={this.clickHandle.bind(this,"test")}><button> clickHandle(arg, e){ }
在构造函数内声明, 不能传参数
箭头函数, 但是都不能传参数
<button onClick={this.btn2Click}>button 2</button> <button onClick={(e) => this.btn3Click(e)}>button 3</button> btn2Click = (e) => { debugger; } btn3Click(e){ debugger; }
使用高阶函数
<button onClick={this.btn5Click("test")}>button 5</button> btn5Click = name => e =>{ debugger; }
源码看React 事件机制
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在构造函数内声明, 不能传参数
箭头函数, 但是都不能传参数
使用高阶函数
事件机制
源码看React 事件机制
The text was updated successfully, but these errors were encountered: