我有一个 React 组件,例如:
function callback(params){..
// I need to use this.setstate but this callback function is called
// from other component. How do I bind value of this here
// 'this' of RespProperties
...
}
class RespProperties extends Component { ..
...
}
这个回调函数是从其他组件调用的。如何在此处绑定“this”的值,以便它可以使用此组件的状态?