Official sound effects (see Livefyre/Observer).
The EEObserverMixin adds a .listenTo
method to a React component. Events that are subscribed to using this method will have their handlers automatically unsubscribed when the component unmounts.
npm install ee-observer-mixin
var EEObserverMixin = require('ee-observer-mixin');
var React = require('react');
React.createClass({
componentDidMount: function () {
this.listenTo(eventEmitter, 'eventName', callback);
},
mixins: [EEObserverMixin]
});