yyx-event
在使用Flux库的时候遇到其中融合的events库出现问题,导致监听的事件删除不掉,监听事件存在重复调用的情况下,自行基于events开发事件库 替换flux框架中的相关事件库
In the use of Flux library encountered in the fusion of the events library problems, leading to the incident can not be deleted eavesdropping, there are two occasions to monitor the event call, based on the event development event library Replaces the related event library in the flux framework
install:
npm install yyx-event
Tips
Usage yyx-event
var EventEmitter = ;var event = ; //监听事件回调//Monitor event callbackslet {}; //监听//listenging event; //触发监听事件//trigger listening eventevent; //卸载事件监听//remove listening eventevent; //设置最大监听事件数量//set the maximum number of listening eventsevent;