You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a8ea6c
Browse filesBrowse the repository at this point in the historyBrowse files
`onClick={this.test}`这里是不能用加括号的这种方式来传参`onClick={this.test(params)}`,并且这样写之后`this.test`里面的this会是`undefined`,所以在react,函数带参数是要配合`bind`方法,通过`bind`获取`this`和参数,深入了解请看[事件 —— this 指针](https://github.com/wscats/react-tutorial/tree/master/react/component/src/event#%E4%BA%8B%E4%BB%B6--this-%E6%8C%87%E9%92%88)
0 commit comments