Last active
April 20, 2016 08:06
-
-
Save chris-kobrzak/eef62301d4d6634098d728cc72b08485 to your computer and use it in GitHub Desktop.
Code sample with only ES6 modules transpiled by Babel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TextInputControl extends _react2.default.Component { | |
constructor(props) { | |
super(props); | |
this.bindInstanceMethods('handleBlurEvent', 'handleChangeEvent'); | |
this.handleChangeEventDebounced = (0, _debounce2.default)(this.handleChangeEvent, props.inputChangeDebounceWait); | |
} | |
bindInstanceMethods(...methods) { | |
methods.forEach(method => this[method] = this[method].bind(this)); | |
} | |
render() { | |
let props = this.props; | |
let secondaryLabel; | |
if (props.secondaryLabel) { | |
secondaryLabel = this.getLabel(props.secondaryLabel, props.secondaryLabelClass); | |
} | |
/* more code here... */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment