1 var React, createSetStateOnEventMixin;
3 React = require('./React-shim');
5 module.exports = createSetStateOnEventMixin = function(eventName) {
7 componentDidMount: function() {
8 return this.unsubscribe = this.props.lc.on(eventName, (function(_this) {
10 return _this.setState(_this.getState());
14 componentWillUnmount: function() {
15 return this.unsubscribe();