我正在使用这个简单的渲染函数和几个处理程序:
render:function(){
return (
<div id="all-highlights" class="highlight-container" onMouseDown={this.drag} onMouseUp={this.dragEnd} onMouseMove={this.moving}>
<div class="highlight">
</div>
</div>
);
}
在React.createClass函数中,使用
this.removeTheListener
函数,我该如何删除特定的mouseMove函数?无论mouseMove函数的性能如何,我知道它的资源消耗很大,但对于我正在做的事情来说,它是完美的事件。是否可以仅删除特定的监听器,然后在不同的时间点再次添加它?