In componentWillMount, I add an event listener to Wallop.
this.wallop = new Wallop(document.querySelector('.Wallop'));
this.wallop.on('change', this.handleWallopChange);
In componentWillUnmount, I want to remove the listener
this.wallop.$selector.removeEventListener('change', this.handleWallopChange);
This doesn't work since Wallop's implementation of on uses an anonymous function. Is it possible to use the callback event instead and perhaps add an off method? Thanks.
In
componentWillMount, I add an event listener to Wallop.In
componentWillUnmount, I want to remove the listenerThis doesn't work since Wallop's implementation of
onuses an anonymous function. Is it possible to use thecallbackevent instead and perhaps add anoffmethod? Thanks.