阅读背景:

如何传递onClick事件处理程序一个函数,该函数接受一个参数并仍然将该函数绑定到组件的“this”上下文?

来源:互联网 

I have a class based React component called "AllProducts.jsx" that I defined like this "class AllProducts extends Component" so when I pass functions to onClick event handlers, I need to bind the context of "this", but when I try to pass one of these functions a parameter, I get an error in the console that says "cannot read property bind of undefined."I have a class based React component called "Al




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: