React bind作用域问题 性能优化

bind 作用域问题,只bind一次

constructor() {
super()
this.state={}
this.delectItem = this.delectItem.bind(this)  //  1.将组件内的函数重新赋值为另外一个函数。
                       2.这个另外的函数,是由bind生成出来的。
                       3.bind函数,将作用域修改为当前组件实例。
}
posted @ 2019-11-13 15:54  清明|雨上  阅读(19)  评论(0)    收藏  举报