import React from 'react';
import OnFireMixin from 'react-onfire-mixin';
const Component_1 = React.createClass({
__ONFIRE__: 'Component_1',
propTypes: {},
mixins: [OnFireMixin],
do_what: function(data) {
},
componentDidMount: function() {
this.on('my_event', this.do_what);
},
render: function() {
return (
<div>
Component_1
</div>
);
}
});
export default Component_1;
import React from 'react';
import OnFireMixin from 'react-onfire-mixin';
const Component_2 = React.createClass({
__ONFIRE__: 'Component_2',
propTypes: {},
mixins: [OnFireMixin],
componentDidMount: function() {
this.fire('my_event', "hello, this is event data.");
},
render: function() {
return (
<div>
Component_2
</div>
);
}
});
export default Component_2;