move to constructor

This commit is contained in:
jberg 2018-05-15 19:22:18 -07:00 committed by Jordan Eldredge
parent ad9d17ad8e
commit a08f792966

View file

@ -7,6 +7,10 @@ const PRESET_TRANSITION_SECONDS = 2.7;
const MILLISECONDS_BETWEEN_PRESET_TRANSITIONS = 15000;
class MilkdropWindow extends React.Component {
constructor(props) {
super(props);
this._handleKeyboardInput = this._handleKeyboardInput.bind(this);
}
componentDidMount() {
require.ensure(
[
@ -44,8 +48,6 @@ class MilkdropWindow extends React.Component {
"butterchurn"
);
this._handleKeyboardInput = this._handleKeyboardInput.bind(this);
require.ensure(
["butterchurn-presets"],
require => {