diff --git a/client/coral-framework/hocs/withEmit.js b/client/coral-framework/hocs/withEmit.js index 46c26c8f6..3a3216c8a 100644 --- a/client/coral-framework/hocs/withEmit.js +++ b/client/coral-framework/hocs/withEmit.js @@ -1,14 +1,18 @@ import React from 'react'; const PropTypes = require('prop-types'); +/** + * WithEmit provides a property `emit: (eventName, value)` + * to the wrapped component. + */ export default (WrappedComponent) => { class WithEmit extends React.Component { static contextTypes = { eventEmitter: PropTypes.object, }; - emit = (eventName, value, context) => { - this.context.eventEmitter.emit(eventName, value, context); + emit = (eventName, value) => { + this.context.eventEmitter.emit(eventName, value); }; render() {