this.handleVote = this.handleVote .bind(this)
此时的this指向新生成的实例,赋值语句右侧的表达式**this.handleVote .bind(this)**会首先找到this.handleVote()这个方法,由对象的属性查找机制(沿原型链由近及远查找)可知此处会查找到原型方法this.handleVote ( ),接着执行bind(this),此处的this指向新生成的实例,所以赋值语句右侧的表达式计算完成后,会生成一个指定了this的新方法,接着执行赋值操作,将新生成的函数赋值给实例的handleVote 属性,由对象的赋值机制可知,此处的handleClick会直接作为实例属性生成。
总结一下,也就是说上面的语句做了一件这样的事情:
把原型方法handleVote ( )改变为实例方法handleVote ( ),并且强制指定这个方法中的this指向当前的实例。